From 8289af27b6b795a02815ba20f37f5992fc720d82 Mon Sep 17 00:00:00 2001 From: Peter Van Dyken Date: Thu, 14 Dec 2023 10:41:28 -0500 Subject: [PATCH] Address PR comments --- snakebids/cli.py | 2 +- snakebids/tests/strategies.py | 12 ++++++------ snakebids/tests/test_app.py | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/snakebids/cli.py b/snakebids/cli.py index 19e0e8ee..75168190 100644 --- a/snakebids/cli.py +++ b/snakebids/cli.py @@ -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 ---------- diff --git a/snakebids/tests/strategies.py b/snakebids/tests/strategies.py index 5f69abae..3c6959e9 100644 --- a/snakebids/tests/strategies.py +++ b/snakebids/tests/strategies.py @@ -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)) @@ -563,8 +565,7 @@ def _is_hashable(item: Any, /): hash(item) except TypeError: return False - else: - return True + return True def _supports_eq(item: Any, /): @@ -572,8 +573,7 @@ def _supports_eq(item: Any, /): item == 0 # type: ignore # noqa: B015 except Exception: # noqa: BLE001 return False - else: - return True + return True def hashables() -> st.SearchStrategy[Hashable]: diff --git a/snakebids/tests/test_app.py b/snakebids/tests/test_app.py index 65d6769d..61698716 100644 --- a/snakebids/tests/test_app.py +++ b/snakebids/tests/test_app.py @@ -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(