Skip to content
Snippets Groups Projects
Unverified Commit d0bb8f13 authored by Lars Bilke's avatar Lars Bilke
Browse files

[mypy] Enabled some checks.

parent f2b0cbc5
No related branches found
No related tags found
1 merge request!133[ci] Add code quality report
...@@ -47,6 +47,7 @@ repos: ...@@ -47,6 +47,7 @@ repos:
hooks: hooks:
- id: mypy - id: mypy
files: ogstools files: ogstools
exclude: ".*/examples/.*"
- repo: https://github.com/codespell-project/codespell - repo: https://github.com/codespell-project/codespell
rev: "v2.2.5" rev: "v2.2.5"
hooks: hooks:
...@@ -67,4 +68,4 @@ repos: ...@@ -67,4 +68,4 @@ repos:
- repo: https://github.com/executablebooks/mdformat - repo: https://github.com/executablebooks/mdformat
rev: 0.7.16 rev: 0.7.16
hooks: hooks:
- id: mdformat - id: mdformat
...@@ -90,16 +90,19 @@ testpaths = ["tests"] ...@@ -90,16 +90,19 @@ testpaths = ["tests"]
line-length = 80 line-length = 80
[tool.mypy] [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/.*'] exclude = ['.*/examples/.*']
ignore_missing_imports = true
scripts_are_modules = true
# Set to true when current issues are fixed
strict = false strict = false
show_error_codes = true # Delete following lines when strict is true:
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] check_untyped_defs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
warn_unreachable = true warn_unreachable = true
# Uncomment and fix one by one:
# check_untyped_defs = true
# disallow_untyped_defs = true
# disallow_incomplete_defs = true
[tool.ruff] [tool.ruff]
select = [ select = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment