From 1cdeb71a2cd9bfd69a432cdf0081a2fda6fb169c Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Fri, 19 Dec 2025 22:53:55 +0200 Subject: [PATCH 1/3] Apply Repo-Review suggestion MY103: MyPy warn unreachable --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index dbed082..54baece 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -166,6 +166,7 @@ strict = true exclude = [ "^tests/data", ] +warn_unreachable = true [[tool.mypy.overrides]] module = 'bids_validator._version' From 5f56d9770853c32501859a9820626bbf0dccdee4 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Fri, 19 Dec 2025 23:05:01 +0200 Subject: [PATCH 2/3] Fix new MyPy errors --- src/bids_validator/types/files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bids_validator/types/files.py b/src/bids_validator/types/files.py index 4cbe652..7d044e5 100644 --- a/src/bids_validator/types/files.py +++ b/src/bids_validator/types/files.py @@ -26,7 +26,7 @@ class FileTree: def __attrs_post_init__(self) -> None: if self.is_dir is None: - object.__setattr__(self, 'is_dir', self.path_obj.is_dir()) + object.__setattr__(self, 'is_dir', self.path_obj.is_dir()) # type: ignore[unreachable] object.__setattr__( self, 'children', From 61f8557b1551692584dfe77aea967d6cbaaad017 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Fri, 19 Dec 2025 22:57:16 +0200 Subject: [PATCH 3/3] Apply Repo-Review suggestions MY104: MyPy enables ignore-without-code MY105: MyPy enables redundant-expr MY106: MyPy enables truthy-bool --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 54baece..ccdf02f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -167,6 +167,7 @@ exclude = [ "^tests/data", ] warn_unreachable = true +enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] [[tool.mypy.overrides]] module = 'bids_validator._version'