Skip to content

Commit

Permalink
Black and flake support
Browse files Browse the repository at this point in the history
  • Loading branch information
TheChymera committed Jun 9, 2022
1 parent 9252f3e commit 12d7def
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tools/schemacode/schemacode/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
DIR_ENTITIES = ["subject", "session"]


def _get_paths(bids_paths,
pseudofile_suffixes = [],
):
def _get_paths(
bids_paths,
pseudofile_suffixes=[],
):
"""
Get all paths from a list of directories, excluding hidden subdirectories from distribution.
Expand All @@ -28,7 +29,8 @@ def _get_paths(bids_paths,
Directories from which to get paths, may also contain file paths, which will remain
unchanged.
pseudofile_suffixes : list of str
Directory suffixes prompting the validation of the directory name and limiting further directory walk.
Directory suffixes prompting the validation of the directory name and limiting further
directory walk.
Notes
-----
Expand Down Expand Up @@ -368,7 +370,8 @@ def validate_all(
Whether to print itemwise notices for checks on the console, and include them in the
validation result.
pseudofile_suffixes : list of str
Directory suffixes prompting the validation of the directory name and limiting further directory walk.
Directory suffixes prompting the validation of the directory name and limiting further
directory walk.
Returns
-------
Expand Down Expand Up @@ -660,6 +663,7 @@ def log_errors(validation_result):
for i in validation_result["path_tracking"]:
lgr.warning("The `%s` file was not matched by any regex schema entry.", i)


def _query_pseudofile_suffixes(my_schema):
"""Query schema for suffixes which identify directory entities.
Expand Down Expand Up @@ -687,6 +691,7 @@ def _query_pseudofile_suffixes(my_schema):
pseudofile_suffixes.append(i[:-1])
return pseudofile_suffixes


def validate_bids(
bids_paths,
schema_reference_root="/usr/share/bids-schema/",
Expand Down

0 comments on commit 12d7def

Please sign in to comment.