Skip to content

Commit

Permalink
Merge branch 'refs/heads/fix-mypy' into upgrade-django5.0-python3.12
Browse files Browse the repository at this point in the history
# Conflicts:
#	tox.ini
  • Loading branch information
browniebroke committed Jul 22, 2024
2 parents 9adf635 + f99bdda commit 24da9c0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: 3.7
Expand Down
7 changes: 4 additions & 3 deletions tests/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,10 @@ class Meta:
class UFMChildSerializerForValidatorMessage(UniqueFieldsMixin,
serializers.ModelSerializer):
field = serializers.CharField(validators=[
UniqueValidator(queryset=models.UFMChild.objects.all(),
message=UNIQUE_ERROR_MESSAGE
)
UniqueValidator(
queryset=models.UFMChild.objects.all(), # type: ignore[attr-defined]
message=UNIQUE_ERROR_MESSAGE,
)
])

class Meta:
Expand Down
15 changes: 7 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ DJANGO_SETTINGS_MODULE = tests.settings

[tox]
envlist =
py{37,38}-dj{22}-drf{38,39,310,311}-{pytest,mypy}
py{37,38}-dj{30}-drf{310,311}-{pytest,mypy}
py{37,38,39,310,311}-dj{31,32}-drf{311,312,313,314}-{pytest,mypy}
py{38,39,310,311}-dj{40,41}-drf{313,314}-{pytest,mypy}
py{37,38}-dj{22}-drf{38,39,310,311}-pytest
py{37,38}-dj{30}-drf{310,311}-pytest
py{37,38,39,310,311}-dj{31,32}-drf{311,312,313,314}-pytest
py{38,39,310,311}-dj{40,41}-drf{313,314}-pytest
py{38,39,310,311,312}-dj{42}-drf{314}-{pytest,mypy}
py{310,311,312}-dj{50}-drf{314}-{pytest,mypy}
skip_missing_interpreters = true
Expand Down Expand Up @@ -51,9 +51,8 @@ deps =
drf313: djangorestframework>=3.13,<3.14
drf314: djangorestframework>=3.14,<3.15
pytest: -rrequirements.txt
mypy: git+https://github.com/typeddjango/djangorestframework-stubs.git@946c7d60aaecdc9ef307f5e1f8eb55f7083ffb16#egg=djangorestframework-stubs
mypy: djangorestframework-stubs
mypy: djangorestframework-stubs[compatible-mypy]
commands=
pytest: pytest --cov drf_writable_nested --cov-report=xml
mypy: mypy example
mypy: mypy .
mypy: mypy --show-traceback example
mypy: mypy --show-traceback .

0 comments on commit 24da9c0

Please sign in to comment.