Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pvandyken committed Dec 14, 2023
1 parent ede325e commit 8289af2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion snakebids/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def _resolve_path(path_candidate: _T) -> _T:


def _resolve_path(path_candidate: Any) -> Any:
"""Resolve paths or list of paths, or return argument unchanged.
"""Resolve paths or list of paths, or return argument unchanged.
Parameters
----------
Expand Down
12 changes: 6 additions & 6 deletions snakebids/tests/strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ def _filter_invalid_entity_lists(entities: Sequence[BidsEntity | str]):
"""
return all(
[
# If suffix is in the path, extension must be too
("suffix" not in entities or "extension" in entities),
(
# If suffix is in the path, extension must be too
"suffix" not in entities or "extension" in entities
),
# Cannot have paths with just datatype, just extension, or just datatype and
# extension
set(map(str, entities))
Expand Down Expand Up @@ -563,17 +565,15 @@ def _is_hashable(item: Any, /):
hash(item)
except TypeError:
return False
else:
return True
return True


def _supports_eq(item: Any, /):
try:
item == 0 # type: ignore # noqa: B015
except Exception: # noqa: BLE001
return False
else:
return True
return True


def hashables() -> st.SearchStrategy[Hashable]:
Expand Down
1 change: 1 addition & 0 deletions snakebids/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def test_runs_in_correct_mode(
)

# Prepare expected config
# dummy db_path: all io functions are mocked, so this can be arbitrary str
db_path = "/path/to/db"
expected_config = copy.deepcopy(app.config)
expected_config.update(
Expand Down

0 comments on commit 8289af2

Please sign in to comment.