Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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