Skip to content

Commit

Permalink
fix mypy version issues by pinning all relevant deps
Browse files Browse the repository at this point in the history
  • Loading branch information
tfranzel committed Dec 10, 2023
1 parent 8268cfa commit a8dcaf8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
9 changes: 9 additions & 0 deletions requirements/linting.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pytest # required for mypy to succeed
flake8
isort==5.12.0 # 5.13 somehow breaks django-stubs plugin
mypy==1.7.1
django-stubs==4.2.3
djangorestframework-stubs==3.14.2

Django==4.2.7
djangorestframework==3.14.0
8 changes: 1 addition & 7 deletions requirements/testing.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
pytest>=5.3.5
pytest-django>=3.8.0
pytest-cov>=2.8.1
flake8>=3.7.9
mypy>=0.770
django-stubs>=1.8.0,<1.10.0
djangorestframework-stubs>=1.1.0
types-PyYAML>=0.1.6
isort>=5.0.4
pytest-cov>=2.8.1
24 changes: 14 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[tox]
envlist =
py39-lint,py39-docs,
py311-lint,py311-docs,
{py36,py37,py38}-django{2.2}-drf{3.10,3.11},
{py37,py38,py39}-django{3.2}-drf{3.11,3.12},
{py38,py39,py310}-django{4.0,4.1}-drf{3.13,3.14},
{py311}-django{4.1, 4.2, 5.0}-drf{3.14},
{py312}-django{4.2, 5.0}-drf{3.14},
py312-django5.0-drfmaster
py312-djangomaster-drf3.14
py312-drfmaster-djangomaster
py312-drfmaster-djangomaster-allowcontribfail
py311-django5.0-drfmaster
py311-djangomaster-drf3.14
py311-drfmaster-djangomaster
py311-drfmaster-djangomaster-allowcontribfail
skip_missing_interpreters = true

[testenv]
Expand Down Expand Up @@ -38,15 +38,16 @@ deps =
-r requirements/testing.txt
-r requirements/optionals.txt

[testenv:py310-drfmaster-djangomaster-allowcontribfail]
[testenv:py311-drfmaster-djangomaster-allowcontribfail]
commands = python runtests.py {posargs:--fast --cov=drf_spectacular --cov=tests --cov-report=xml --allow-contrib-fail}

[testenv:py39-lint]
[testenv:py311-lint]
commands = python runtests.py --lintonly
deps =
-r requirements/testing.txt
-r requirements/base.txt
-r requirements/linting.txt

[testenv:py39-docs]
[testenv:py311-docs]
commands = sphinx-build -WEa -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
deps =
-r requirements/docs.txt
Expand Down Expand Up @@ -160,4 +161,7 @@ ignore_missing_imports = True
ignore_missing_imports = True

[mypy-pydantic.*]
ignore_missing_imports = True
ignore_missing_imports = True

[mypy-exceptiongroup.*]
ignore_missing_imports = True

0 comments on commit a8dcaf8

Please sign in to comment.