Skip to content

Commit

Permalink
Feature/mx1480 and mx1498 adapt dev tool config (#10)
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 5725c38 commit f7f1565
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 31 deletions.
8 changes: 0 additions & 8 deletions .mypy.ini

This file was deleted.

5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,17 @@ repos:
name: poetry
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
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:
- "backoff>=2.2.1,<3"
- "fastapi>=0.104.1,<1"
- "mex-common@git+https://github.com/robert-koch-institut/mex-common.git@0.14.1"
- "neo4j>=5.15.0,<6"
- "pydantic[dotenv,email]>=1.10.13,<2"
- "pytest>=7.4.3,<8"
- "types-pytz>=2023.3.1.1,<2024"
Expand Down
12 changes: 1 addition & 11 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@ backend = "mex.backend.main:main"
[tool.ipdb]
context = 5

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

[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=99",
"--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 f7f1565

Please sign in to comment.