Skip to content

Commit

Permalink
CI: Use django-stubs 1.14.0 for testing (#346)
Browse files Browse the repository at this point in the history
Needs changes to our typecheck ignores.
  • Loading branch information
intgr committed Feb 9, 2023
1 parent 0f8579f commit fddecec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -7,6 +7,6 @@ djangorestframework==3.14.0
types-pytz==2022.7.1.0
types-requests==2.28.11.8
types-urllib3==1.26.25.4
django-stubs==1.13.0
django-stubs==1.14.0
django-stubs-ext==0.7.0
-e .[compatible-mypy,coreapi,markdown]
13 changes: 7 additions & 6 deletions scripts/typecheck_tests.py
Expand Up @@ -56,6 +56,7 @@
'"_MonkeyPatchedWSGIResponse" has no attribute "content"',
'"_MonkeyPatchedWSGIResponse" has no attribute "data"',
'" defined here',
'" has no attribute "id"',
],
"authentication": [
'Argument 1 to "post" of "APIClient" has incompatible type "None"; expected "str',
Expand All @@ -82,7 +83,6 @@
'Incompatible types in assignment (expression has type "AsView[GenericView]", variable has type "AsView[Callable[[HttpRequest], Any]]")', # noqa: E501
'Argument "patterns" to "SchemaGenerator" has incompatible type "List[object]"',
'Argument 1 to "field_to_schema" has incompatible type "object"; expected "Field[Any, Any, Any, Any]"',
'Argument "help_text" to "CharField" has incompatible type "_StrPromise"',
'"Module rest_framework.schemas.coreapi" does not explicitly export attribute "coreapi"',
],
"browsable_api": [
Expand All @@ -91,6 +91,7 @@
"models.py": [
'"ForeignKeyTarget" has no attribute "sources"',
'"CustomManager" not callable',
'Incompatible types in assignment (expression has type "Type[BaseManager[Any]]", variable has type "Type[CustomManager]")', # noqa: E501
],
"test_authtoken.py": [
'Item "None" of "Optional[Token]" has no attribute "key"',
Expand Down Expand Up @@ -127,7 +128,8 @@
"test_generics.py": [
'has incompatible type "str"',
'"Response" has no attribute "serializer"',
' Incompatible types in assignment (expression has type "Type[SlugSerializer]", base class "InstanceView" defined the type as "Type[BasicSerializer]")', # noqa: E501
'Incompatible types in assignment (expression has type "Type[SlugSerializer]", base class "InstanceView" defined the type as "Type[BasicSerializer]")', # noqa: E501
'Incompatible types in assignment (expression has type "_QuerySet[SlugBasedModel, SlugBasedModel]", base class "InstanceView" defined the type as "_QuerySet[BasicModel, BasicModel]")', # noqa: E501
],
"test_htmlrenderer.py": [
'to "get_template_names" of "TemplateHTMLRenderer" has incompatible type',
Expand All @@ -138,12 +140,15 @@
"test_model_serializer.py": [
'"Field[Any, Any, Any, Any]" has no attribute',
'base class "Meta" defined the type as',
'"OneFieldModel" has no attribute "additional_attr"',
],
"test_negotiation.py": ['has incompatible type "None"'],
"test_pagination.py": [
"(not iterable)",
'has incompatible type "range"',
'expected "Iterable[Any]"',
'Value of type variable "_MT" of "paginate_queryset" of "CursorPagination" cannot be "object"',
'Value of type "Union[object, Any]" is not indexable',
],
"test_parsers.py": ['"object" has no attribute', 'Argument 1 to "isnan" has incompatible type'],
"test_permissions.py": [
Expand All @@ -160,7 +165,6 @@
'Argument 2 to "re_path" has incompatible type "Callable[[], None]"; expected "Callable[..., HttpResponseBase]"', # noqa: E501
],
"test_relations_pk.py": [
'"OneToOneTarget" has no attribute "id"',
'"Field[Any, Any, Any, Any]" has no attribute "get_queryset',
],
"test_renderers.py": [
Expand All @@ -180,9 +184,6 @@
'"BasenameTestCase" has no attribute "router"',
'Unexpected keyword argument "use_regex_path" for "SimpleRouter"',
],
"test_reverse.py": [
'Incompatible types in assignment (expression has type "MockVersioningScheme", variable has type "Optional[BaseVersioning]', # noqa: E501
],
"test_serializer.py": [
"base class",
'"CharField" has incompatible type "Collection[Any]"',
Expand Down

0 comments on commit fddecec

Please sign in to comment.