diff --git a/pyproject.toml b/pyproject.toml index dbed082..ccdf02f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -166,6 +166,8 @@ strict = true exclude = [ "^tests/data", ] +warn_unreachable = true +enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] [[tool.mypy.overrides]] module = 'bids_validator._version' 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',