Adds django@4.0 support (#786)

* Adds django@4.0 support

* Fixes CI

* Fixes CI

* Ignore new error for django4.0

* Fixes
This commit is contained in:
Nikita Sobolev
2021-12-16 21:51:46 +03:00
committed by GitHub
parent e9b328a935
commit b50a9077f8
4 changed files with 17 additions and 10 deletions

View File

@@ -111,6 +111,7 @@ IGNORED_ERRORS = {
"Unsupported dynamic base class",
'error: "HttpResponse" has no attribute "streaming_content"',
'error: "HttpResponse" has no attribute "context_data"',
'Duplicate module named "apps"',
],
"admin_checks": ['Argument 1 to "append" of "list" has incompatible type "str"; expected "CheckMessage"'],
"admin_default_site": [
@@ -514,7 +515,7 @@ IGNORED_ERRORS = {
def check_if_custom_ignores_are_covered_by_common() -> None:
from scripts.typecheck_tests import is_pattern_fits
from scripts.typecheck_tests import does_pattern_fit
common_ignore_patterns = IGNORED_ERRORS["__common__"]
for module_name, patterns in IGNORED_ERRORS.items():
@@ -522,7 +523,7 @@ def check_if_custom_ignores_are_covered_by_common() -> None:
continue
for pattern in patterns:
for common_pattern in common_ignore_patterns:
if isinstance(pattern, str) and is_pattern_fits(common_pattern, pattern):
if isinstance(pattern, str) and does_pattern_fit(common_pattern, pattern):
print(f'pattern "{module_name}: {pattern!r}" is covered by pattern {common_pattern!r}')