|
5 | 5 | from argparse import ArgumentParser
|
6 | 6 | from collections import defaultdict
|
7 | 7 | from distutils import dir_util, spawn
|
| 8 | +from pathlib import Path |
8 | 9 | from typing import Dict, List, Pattern, Union
|
9 | 10 |
|
10 | 11 | from scripts.git_helpers import checkout_target_tag
|
|
60 | 61 | '"BaseTokenAuthTests" has no attribute "assertNumQueries"',
|
61 | 62 | 'Module "django.middleware.csrf" has no attribute "_mask_cipher_secret"',
|
62 | 63 | "All conditional function variants must have identical signatures",
|
| 64 | + "note: def _get_new_csrf_token() ->", |
| 65 | + "note: Original:", |
| 66 | + "note: Redefinition:", |
63 | 67 | ],
|
64 | 68 | "schemas": [
|
65 | 69 | '(expression has type "CharField", base class "Field" defined the type as "bool")',
|
|
77 | 81 | 'Argument "patterns" to "SchemaGenerator" has incompatible type "List[object]"',
|
78 | 82 | 'Argument 1 to "field_to_schema" has incompatible type "object"; expected "Field[Any, Any, Any, Any]"',
|
79 | 83 | 'Argument "help_text" to "CharField" has incompatible type "_StrPromise"',
|
| 84 | + '"Module rest_framework.schemas.coreapi" does not explicitly export attribute "coreapi"', |
80 | 85 | ],
|
81 | 86 | "browsable_api": [
|
82 | 87 | '(expression has type "List[Dict[str, Dict[str, int]]]", base class "GenericAPIView" defined the type as "Union[QuerySet[_MT?], Manager[_MT?], None]")', # noqa: E501
|
|
114 | 119 | 'Argument "params" to "ValidationError" has incompatible type "Tuple[str]"',
|
115 | 120 | '"MultipleChoiceField[Model]" has no attribute "partial"',
|
116 | 121 | 'Argument 1 to "to_internal_value" of "Field" has incompatible type "Dict[str, str]"; expected "List[Any]"',
|
117 |
| - 'Module "rest_framework.fields" has no attribute "DjangoImageField"; maybe "ImageField"?', |
| 122 | + 'Module "rest_framework.fields" does not explicitly export attribute "DjangoImageField"', |
118 | 123 | 'Argument 1 to "ListField" has incompatible type "CharField"; expected "bool"',
|
119 | 124 | "Possible overload variants:",
|
120 | 125 | "def __init__(self, *, mutable: Literal[True], query_string: Union[str, bytes, None] = ..., encoding: Optional[str] = ...) -> QueryDict", # noqa: E501
|
@@ -311,7 +316,8 @@ def update(self, op_code, cur_count, max_count=None, message=""):
|
311 | 316 | dir_util.copy_tree(str(STUBS_DIRECTORY), str(DRF_SOURCE_DIRECTORY / "rest_framework"))
|
312 | 317 | mypy_config_file = (PROJECT_DIRECTORY / "mypy.ini").absolute()
|
313 | 318 | mypy_cache_dir = PROJECT_DIRECTORY / ".mypy_cache"
|
314 |
| - tests_root = DRF_SOURCE_DIRECTORY / "tests" |
| 319 | + # HACK: Work around https://github.com/python/mypy/issues/14042 |
| 320 | + tests_root = Path("drf_source") / "tests" |
315 | 321 | global_rc = 0
|
316 | 322 |
|
317 | 323 | try:
|
|
0 commit comments