diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc6045cd3486a7ac53c2b0e9a8832f9c3819b486..3e9c65864e82a39d9dd2d4f3bc54cdda56636601 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,6 +47,7 @@ repos: hooks: - id: mypy files: ogstools + exclude: ".*/examples/.*" - repo: https://github.com/codespell-project/codespell rev: "v2.2.5" hooks: @@ -67,4 +68,4 @@ repos: - repo: https://github.com/executablebooks/mdformat rev: 0.7.16 hooks: - - id: mdformat + - id: mdformat diff --git a/pyproject.toml b/pyproject.toml index 7c656d05b717d57dc958091bbb753d6c50a1ba37..3ff6c2b35b5de17b25187130b44fa71cb0efe18e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,16 +90,19 @@ testpaths = ["tests"] line-length = 80 [tool.mypy] -files = "ogstools" +files = "ogstools/**/*.py" +# does not work when mypy invoked directly, works in pre-commit as explicitly +# stated there again: exclude = ['.*/examples/.*'] +ignore_missing_imports = true +scripts_are_modules = true +# Set to true when current issues are fixed strict = false -show_error_codes = true -enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] +# Delete following lines when strict is true: +check_untyped_defs = true +disallow_untyped_defs = true +disallow_incomplete_defs = true warn_unreachable = true -# Uncomment and fix one by one: -# check_untyped_defs = true -# disallow_untyped_defs = true -# disallow_incomplete_defs = true [tool.ruff] select = [