Skip to content

Commit

Permalink
Really run mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
iurisilvio committed Feb 7, 2024
1 parent 7ba476d commit a34f31c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion django_migrations_ci/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def pytest_configure(config):
return

try:
from pytest_django import plugin # type: ignore[import-untyped]
from pytest_django import plugin

db_unblock = config.stash[plugin.blocking_manager_key].unblock
except AttributeError:
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ skip_covered = true
exclude = [
"example/",
]
plugins = [
"mypy_django_plugin.main",
]
[tool.django-stubs]
django_settings_module = "tests.testapp.settings"


[tool.ruff.lint]
select = ["ALL"]
Expand Down
2 changes: 1 addition & 1 deletion tests/testapp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class Bus(models.Model):
plate = models.TextField() # type: ignore[var-annotated]
plate = models.TextField()
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
isolated_build = true
envlist = py{310,311}-dj{32,42,50,latest}-{mysql,postgresql,sqlite},lint,py312-dj{50,latest}
envlist = py{310,311}-dj{32,42,50,latest}-{mysql,postgresql,sqlite},lint,mypy,py312-dj{50,latest}

[testenv]
allowlist_externals = poetry
Expand Down Expand Up @@ -29,6 +29,9 @@ commands =
description = lint source code
deps =
mypy
django-stubs
pytest
pytest-django
commands =
mypy .

Expand Down

0 comments on commit a34f31c

Please sign in to comment.