mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-12 15:01:55 +08:00
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:
@@ -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}')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user