Check arguments to django.urls.{path,re_path} functions (#464)

These functions were added in Django 2.0, but the stubs have been
incomplete since commit 9a68263257

The implementation is almost identical to `url()` from
`conf/urls/__init__.pyi`
This commit is contained in:
Marti Raudsepp authored and GitHub committed 2020-09-17 18:08:26 +03:00
1 parent f77ebcd22c
commit 5ff99fd047
2 files changed
+30 -5

No files matched your search

+3 -1
View File
@@ -451,9 +451,11 @@ IGNORED_ERRORS = {
'urlpatterns': [
'"object" not callable',
'"None" not callable',
'Argument 2 to "path" has incompatible type "Callable[[Any], None]"',
'Incompatible return value type (got "None", expected "HttpResponseBase")',
],
'urlpatterns_reverse': [
'List or tuple expected as variable arguments',
'No overload variant of "path" matches argument types "str", "None"',
'No overload variant of "zip" matches argument types "Any", "object"',
'Argument 1 to "get_callable" has incompatible type "int"'
],