Skip to content

Commit

Permalink
Fix django-stubs / mypy config
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuatz committed Nov 12, 2024
1 parent cfb322d commit 43ee85c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions django_utils_lib/stubs/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Warning: This is a stub `settings.py` file, to satisfy the django-stubs mypy
# plugin
7 changes: 6 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ warn_unused_configs = True
warn_incomplete_stub = True

# == Plugins ==
plugins = pydantic.mypy
plugins =
pydantic.mypy,
mypy_django_plugin.main

[mypy.plugins.django-stubs]
django_settings_module = "django_utils_lib.stubs.settings"
4 changes: 2 additions & 2 deletions poetry.lock

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

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pytest-django = "^4.9.0"
pytest-playwright = "^0.5.2"
filelock = "^3.16.0"
debugpy = "^1.8.5"
django = "*"

[tool.ruff]
line-length = 120
Expand Down

0 comments on commit 43ee85c

Please sign in to comment.