Skip to content

Commit f7f1565

Browse files
Feature/mx1480 and mx1498 adapt dev tool config (#10)
- 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
1 parent 5725c38 commit f7f1565

File tree

5 files changed

+25
-31
lines changed

5 files changed

+25
-31
lines changed

.mypy.ini

Lines changed: 0 additions & 8 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@ repos:
2626
name: poetry
2727
- repo: https://github.com/pre-commit/mirrors-mypy
2828
rev: v1.7.0
29-
hooks:
29+
hooks: # configured according to mypy maintainer: https://github.com/python/mypy/issues/13916
3030
- id: mypy
3131
name: mypy
3232
files: ^mex/
33+
pass_filenames: false
34+
args: [mex]
3335
additional_dependencies:
3436
- "backoff>=2.2.1,<3"
3537
- "fastapi>=0.104.1,<1"
3638
- "mex-common@git+https://github.com/robert-koch-institut/[email protected]"
39+
- "neo4j>=5.15.0,<6"
3740
- "pydantic[dotenv,email]>=1.10.13,<2"
3841
- "pytest>=7.4.3,<8"
3942
- "types-pytz>=2023.3.1.1,<2024"

poetry.lock

Lines changed: 1 addition & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,26 @@ backend = "mex.backend.main:main"
3333
[tool.ipdb]
3434
context = 5
3535

36+
[tool.mypy]
37+
python_version = "3.11"
38+
show_error_codes = true
39+
strict = true
40+
41+
[tool.pydantic-mypy]
42+
warn_untyped_fields = true
43+
44+
[tool.pytest.ini_options]
45+
addopts = [
46+
"--verbose",
47+
"--cov",
48+
"--no-cov-on-fail",
49+
"--cov-report=term-missing:skip-covered",
50+
"--cov-fail-under=99",
51+
"--cov-branch",
52+
"--pdbcls=IPython.terminal.debugger:TerminalPdb"
53+
]
54+
markers = "integration: mark a test as integration test allowing it to load real settings"
55+
3656
[tool.ruff]
3757
fix = true
3858
ignore = [

pytest.ini

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)