diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0b2368bd..24926991 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,7 +61,8 @@ jobs: SETUPTOOLS_ENABLE_FEATURES=legacy-editable pip install -r ./requirements.txt - name: Run tests - run: pytest + # Suppress errors from other packages due to https://github.com/typeddjango/pytest-mypy-plugins/issues/134 + run: pytest --mypy-only-local-stub stubtest: timeout-minutes: 10 diff --git a/mypy.ini b/mypy.ini index 79c93df0..e140bf24 100644 --- a/mypy.ini +++ b/mypy.ini @@ -23,23 +23,3 @@ plugins = [mypy.plugins.django-stubs] django_settings_module = scripts.drf_tests_settings - -# Suppress errors from site-packages due to https://github.com/typeddjango/pytest-mypy-plugins/issues/134 -[mypy-uritemplate.*] -warn_unreachable = false - -[mypy-yaml.*] -disallow_untyped_defs = false -disallow_incomplete_defs = false - -[mypy-urllib3.*] -disallow_untyped_defs = false -disallow_incomplete_defs = false - -[mypy-requests.*] -disallow_untyped_defs = false -disallow_incomplete_defs = false - -[mypy-markdown.*] -disallow_untyped_defs = false -disallow_incomplete_defs = false diff --git a/rest_framework-stubs/serializers.pyi b/rest_framework-stubs/serializers.pyi index 833005d1..c7c3e373 100644 --- a/rest_framework-stubs/serializers.pyi +++ b/rest_framework-stubs/serializers.pyi @@ -263,4 +263,4 @@ class ModelSerializer(Serializer, BaseSerializer[_MT]): def get_unique_together_validators(self) -> list[UniqueTogetherValidator]: ... def get_unique_for_date_validators(self) -> list[BaseUniqueForValidator]: ... -class HyperlinkedModelSerializer(ModelSerializer): ... +class HyperlinkedModelSerializer(ModelSerializer[_MT]): ...