Skip to content

Commit

Permalink
assign vatlue to checked_metadata_file
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Jul 9, 2024
1 parent 0ee2abd commit fbdcbc5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions eye2bids/edf2bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def _check_inputs(
else:
raise FileNotFoundError(f"No such input file: {cheked_input_file}")

checked_metadata_file = None
if metadata_file in [None, ""]:
e2b_log.warning(
"""Load the metadata.yml file with the additional metadata.\n
Expand All @@ -59,16 +58,18 @@ def _check_inputs(
if metadata_file in ["", None]:
if not force:
e2b_log.error(
"""You didn't pass a metadata.yml file. As this file contains metadata\n
which is REQUIRED for a valid BIDS dataset, the conversion process now\n
stops. Please start again with a metadata.yml file\n
or run eye2bids in force mode.\n
(will produce an invalid BIDS dataset).\n"""
"""You didn't pass a metadata.yml file.
As this file contains metadata
which is REQUIRED for a valid BIDS dataset,
the conversion process now stops.
Please start again with a metadata.yml file
or run eye2bids in force mode.\n
This will produce an invalid BIDS dataset.\n"""
)
raise SystemExit(1)


elif isinstance(metadata_file, str):
checked_metadata_file = None
if isinstance(metadata_file, str):
checked_metadata_file = Path(metadata_file)
elif isinstance(metadata_file, Path):
checked_metadata_file = metadata_file
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ module = [
]

[tool.pytest.ini_options]
addopts = "-ra -q -vv --cov eye2bids"
addopts = "-ra -q -vv --cov eye2bids --durations=0"
norecursedirs = "data"
testpaths = ["tests/"]

0 comments on commit fbdcbc5

Please sign in to comment.