Skip to content

Commit

Permalink
Feature/mx1480 and mx1498 adapt dev tool config (#35)
Browse files Browse the repository at this point in the history
- mypy pre-commit hook now always runs on all files instead of only
changed files, which is the python/mypy#13916
- mypy now shows errors in case of missing imports (prior: silently
ignored missing imports)
- move content of .mypy.ini and pytest.ini into pyproject.toml
  • Loading branch information
rababerladuseladim authored Nov 30, 2023
1 parent a54d50f commit 6177cfe
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 deletions.
9 changes: 0 additions & 9 deletions .mypy.ini

This file was deleted.

4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ repos:
name: poetry
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
hooks:
hooks: # configured according to mypy maintainer: https://github.com/python/mypy/issues/13916
- id: mypy
name: mypy
files: ^mex/
pass_filenames: false
args: [mex]
additional_dependencies:
- "fastapi>=0.104.0,<1"
- "mex-common@git+https://github.com/robert-koch-institut/mex-common.git@0.15.0"
Expand Down
22 changes: 22 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,28 @@ token = "mex.drop.security:generate_token"
[tool.ipdb]
context = 5

[tool.mypy]
python_version = "3.11"
show_error_codes = true
strict = true
plugins = [
"pydantic.mypy"
]

[tool.pydantic-mypy]
warn_untyped_fields = true
[tool.pytest.ini_options]
addopts = [
"--verbose",
"--cov",
"--no-cov-on-fail",
"--cov-report=term-missing:skip-covered",
"--cov-fail-under=100",
"--cov-branch",
"--pdbcls=IPython.terminal.debugger:TerminalPdb"
]
markers = "integration: mark a test as integration test allowing it to load real settings"

[tool.ruff]
fix = true
ignore = [
Expand Down
11 changes: 0 additions & 11 deletions pytest.ini

This file was deleted.

0 comments on commit 6177cfe

Please sign in to comment.