Skip to content

Commit 2a0f222

Browse files
committed
Ruff formatting.
1 parent c61629b commit 2a0f222

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

isatools/convert/isatab2json.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@ def convert(self, work_dir):
142142

143143
# validate json
144144
with open(join(SCHEMAS_PATH, INVESTIGATION_SCHEMA)) as json_fp:
145-
#investigation_schema = json.load(json_fp)
146-
#schema = DRAFT4.create_resource(investigation_schema)
147-
#registry = Registry.with_resource(investigation_schema['id'], schema)
148-
#validator = Draft4Validator(investigation_schema, registry=registry)
149-
#validator.validate(isa_json)
145+
# investigation_schema = json.load(json_fp)
146+
# schema = DRAFT4.create_resource(investigation_schema)
147+
# registry = Registry.with_resource(investigation_schema['id'], schema)
148+
# validator = Draft4Validator(investigation_schema, registry=registry)
149+
# validator.validate(isa_json)
150150

151151
resources = []
152152
schemas_dir = Path(SCHEMAS_PATH)

isatools/isajson/validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Don't forget to read the ISA-JSON spec:
55
https://isa-specs.readthedocs.io/en/latest/isajson.html
66
"""
7+
78
from __future__ import absolute_import
89

910
import glob
@@ -545,7 +546,6 @@ def check_utf8(fp):
545546
raise SystemError()
546547

547548

548-
549549
def check_isa_schemas(isa_json, investigation_schema_path):
550550
"""Used for rule 0003 and 4003"""
551551
try:

tests/validators/test_validate_test_data.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,11 @@ def test_validate_testdata_sampleassayplan_json(self):
359359
sample_assay_plan_schema = json.load(fp)
360360

361361
resources = []
362-
res_path = pathlib.Path(
363-
"file://", self.v2_create_schemas_path, "sample_assay_plan_schema.json"
364-
).resolve().as_uri()
362+
res_path = (
363+
pathlib.Path("file://", self.v2_create_schemas_path, "sample_assay_plan_schema.json")
364+
.resolve()
365+
.as_uri()
366+
)
365367
schemas_dir = pathlib.Path("file://", self.v2_create_schemas_path)
366368
for p in sorted(schemas_dir.glob("*.json")):
367369
contents = json.loads(p.read_text(encoding="utf-8"))
@@ -374,7 +376,6 @@ def test_validate_testdata_sampleassayplan_json(self):
374376
validator = Draft4Validator(schema_ref, registry=registry, format_checker=FormatChecker())
375377
validator.validate(json.load(test_case_fp))
376378

377-
378379
def test_validate_testdata_sampleassayplan_qc_json(self):
379380
with open(os.path.join(utils.JSON_DATA_DIR, "create", "sampleassayplan_qc_test.json")) as test_case_fp:
380381
with open(os.path.join(self.v2_create_schemas_path, "sample_assay_plan_schema.json")) as fp:

0 commit comments

Comments
 (0)