Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Nell Hardcastle <[email protected]>
  • Loading branch information
effigies and nellh committed Nov 13, 2024
1 parent daf2fe8 commit 19bc8ec
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/schemacode/bidsschematools/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,13 @@ def pre_receive_hook(schema, input_, output):
dataset_type = description.get("DatasetType", "raw")
logger.info("Dataset type: %s", dataset_type)

ignore = [line.strip() for line in stream if line != "0001\n"]
ignore = []
for line in stream:
if line == "0001\n":
break
ignore.append(line.strip())
logger.info("Ignore patterns found: %d", len(ignore))

schema = load_schema(schema)
all_rules = chain.from_iterable(
regexify_filename_rules(group, schema, level=2)
for group in (schema.rules.files.common, schema.rules.files.raw)
Expand Down

0 comments on commit 19bc8ec

Please sign in to comment.