|
44 | 44 | import typing
|
45 | 45 | import warnings
|
46 | 46 | from functools import lru_cache
|
47 |
| -from typing import TYPE_CHECKING, Any, Callable, Generator, Optional, TypeVar, Union |
| 47 | +from typing import ( |
| 48 | + TYPE_CHECKING, |
| 49 | + Any, |
| 50 | + Callable, |
| 51 | + ClassVar, |
| 52 | + Generator, |
| 53 | + Optional, |
| 54 | + TypeVar, |
| 55 | + Union, |
| 56 | +) |
48 | 57 |
|
49 | 58 | from astroid import decorators, mixins, util
|
50 | 59 | from astroid.bases import Instance, _infer_stmts
|
@@ -478,7 +487,7 @@ def __init__(
|
478 | 487 | parent=parent,
|
479 | 488 | )
|
480 | 489 |
|
481 |
| - assigned_stmts: AssignedStmtsCall["AssignName"] |
| 490 | + assigned_stmts: ClassVar[AssignedStmtsCall["AssignName"]] |
482 | 491 | """Returns the assigned statement (non inferred) according to the assignment type.
|
483 | 492 | See astroid/protocols.py for actual implementation.
|
484 | 493 | """
|
@@ -804,7 +813,7 @@ def postinit(
|
804 | 813 | if type_comment_posonlyargs is not None:
|
805 | 814 | self.type_comment_posonlyargs = type_comment_posonlyargs
|
806 | 815 |
|
807 |
| - assigned_stmts: AssignedStmtsCall["Arguments"] |
| 816 | + assigned_stmts: ClassVar[AssignedStmtsCall["Arguments"]] |
808 | 817 | """Returns the assigned statement (non inferred) according to the assignment type.
|
809 | 818 | See astroid/protocols.py for actual implementation.
|
810 | 819 | """
|
@@ -1062,7 +1071,7 @@ def postinit(self, expr: Optional[NodeNG] = None) -> None:
|
1062 | 1071 | """
|
1063 | 1072 | self.expr = expr
|
1064 | 1073 |
|
1065 |
| - assigned_stmts: AssignedStmtsCall["AssignAttr"] |
| 1074 | + assigned_stmts: ClassVar[AssignedStmtsCall["AssignAttr"]] |
1066 | 1075 | """Returns the assigned statement (non inferred) according to the assignment type.
|
1067 | 1076 | See astroid/protocols.py for actual implementation.
|
1068 | 1077 | """
|
@@ -1210,7 +1219,7 @@ def postinit(
|
1210 | 1219 | self.value = value
|
1211 | 1220 | self.type_annotation = type_annotation
|
1212 | 1221 |
|
1213 |
| - assigned_stmts: AssignedStmtsCall["Assign"] |
| 1222 | + assigned_stmts: ClassVar[AssignedStmtsCall["Assign"]] |
1214 | 1223 | """Returns the assigned statement (non inferred) according to the assignment type.
|
1215 | 1224 | See astroid/protocols.py for actual implementation.
|
1216 | 1225 | """
|
@@ -1307,7 +1316,7 @@ def postinit(
|
1307 | 1316 | self.value = value
|
1308 | 1317 | self.simple = simple
|
1309 | 1318 |
|
1310 |
| - assigned_stmts: AssignedStmtsCall["AnnAssign"] |
| 1319 | + assigned_stmts: ClassVar[AssignedStmtsCall["AnnAssign"]] |
1311 | 1320 | """Returns the assigned statement (non inferred) according to the assignment type.
|
1312 | 1321 | See astroid/protocols.py for actual implementation.
|
1313 | 1322 | """
|
@@ -1393,7 +1402,7 @@ def postinit(
|
1393 | 1402 | self.target = target
|
1394 | 1403 | self.value = value
|
1395 | 1404 |
|
1396 |
| - assigned_stmts: AssignedStmtsCall["AugAssign"] |
| 1405 | + assigned_stmts: ClassVar[AssignedStmtsCall["AugAssign"]] |
1397 | 1406 | """Returns the assigned statement (non inferred) according to the assignment type.
|
1398 | 1407 | See astroid/protocols.py for actual implementation.
|
1399 | 1408 | """
|
@@ -1864,7 +1873,7 @@ def postinit(
|
1864 | 1873 | self.ifs = ifs
|
1865 | 1874 | self.is_async = is_async
|
1866 | 1875 |
|
1867 |
| - assigned_stmts: AssignedStmtsCall["Comprehension"] |
| 1876 | + assigned_stmts: ClassVar[AssignedStmtsCall["Comprehension"]] |
1868 | 1877 | """Returns the assigned statement (non inferred) according to the assignment type.
|
1869 | 1878 | See astroid/protocols.py for actual implementation.
|
1870 | 1879 | """
|
@@ -2556,7 +2565,7 @@ def __init__(
|
2556 | 2565 | parent=parent,
|
2557 | 2566 | )
|
2558 | 2567 |
|
2559 |
| - assigned_stmts: AssignedStmtsCall["ExceptHandler"] |
| 2568 | + assigned_stmts: ClassVar[AssignedStmtsCall["ExceptHandler"]] |
2560 | 2569 | """Returns the assigned statement (non inferred) according to the assignment type.
|
2561 | 2570 | See astroid/protocols.py for actual implementation.
|
2562 | 2571 | """
|
@@ -2719,7 +2728,7 @@ def postinit(
|
2719 | 2728 | self.orelse = orelse
|
2720 | 2729 | self.type_annotation = type_annotation
|
2721 | 2730 |
|
2722 |
| - assigned_stmts: AssignedStmtsCall["For"] |
| 2731 | + assigned_stmts: ClassVar[AssignedStmtsCall["For"]] |
2723 | 2732 | """Returns the assigned statement (non inferred) according to the assignment type.
|
2724 | 2733 | See astroid/protocols.py for actual implementation.
|
2725 | 2734 | """
|
@@ -3424,7 +3433,7 @@ def __init__(
|
3424 | 3433 | parent=parent,
|
3425 | 3434 | )
|
3426 | 3435 |
|
3427 |
| - assigned_stmts: AssignedStmtsCall["List"] |
| 3436 | + assigned_stmts: ClassVar[AssignedStmtsCall["List"]] |
3428 | 3437 | """Returns the assigned statement (non inferred) according to the assignment type.
|
3429 | 3438 | See astroid/protocols.py for actual implementation.
|
3430 | 3439 | """
|
@@ -3855,7 +3864,7 @@ def postinit(self, value: Optional[NodeNG] = None) -> None:
|
3855 | 3864 | """
|
3856 | 3865 | self.value = value
|
3857 | 3866 |
|
3858 |
| - assigned_stmts: AssignedStmtsCall["Starred"] |
| 3867 | + assigned_stmts: ClassVar[AssignedStmtsCall["Starred"]] |
3859 | 3868 | """Returns the assigned statement (non inferred) according to the assignment type.
|
3860 | 3869 | See astroid/protocols.py for actual implementation.
|
3861 | 3870 | """
|
@@ -4186,7 +4195,7 @@ def __init__(
|
4186 | 4195 | parent=parent,
|
4187 | 4196 | )
|
4188 | 4197 |
|
4189 |
| - assigned_stmts: AssignedStmtsCall["Tuple"] |
| 4198 | + assigned_stmts: ClassVar[AssignedStmtsCall["Tuple"]] |
4190 | 4199 | """Returns the assigned statement (non inferred) according to the assignment type.
|
4191 | 4200 | See astroid/protocols.py for actual implementation.
|
4192 | 4201 | """
|
@@ -4485,7 +4494,7 @@ def postinit(
|
4485 | 4494 | self.body = body
|
4486 | 4495 | self.type_annotation = type_annotation
|
4487 | 4496 |
|
4488 |
| - assigned_stmts: AssignedStmtsCall["With"] |
| 4497 | + assigned_stmts: ClassVar[AssignedStmtsCall["With"]] |
4489 | 4498 | """Returns the assigned statement (non inferred) according to the assignment type.
|
4490 | 4499 | See astroid/protocols.py for actual implementation.
|
4491 | 4500 | """
|
@@ -4793,7 +4802,7 @@ def postinit(self, target: NodeNG, value: NodeNG) -> None:
|
4793 | 4802 | self.target = target
|
4794 | 4803 | self.value = value
|
4795 | 4804 |
|
4796 |
| - assigned_stmts: AssignedStmtsCall["NamedExpr"] |
| 4805 | + assigned_stmts: ClassVar[AssignedStmtsCall["NamedExpr"]] |
4797 | 4806 | """Returns the assigned statement (non inferred) according to the assignment type.
|
4798 | 4807 | See astroid/protocols.py for actual implementation.
|
4799 | 4808 | """
|
@@ -5160,14 +5169,16 @@ def postinit(
|
5160 | 5169 | self.patterns = patterns
|
5161 | 5170 | self.rest = rest
|
5162 | 5171 |
|
5163 |
| - assigned_stmts: Callable[ |
5164 |
| - [ |
5165 |
| - "MatchMapping", |
5166 |
| - AssignName, |
5167 |
| - Optional[InferenceContext], |
5168 |
| - Literal[None], |
5169 |
| - ], |
5170 |
| - Generator[NodeNG, None, None], |
| 5172 | + assigned_stmts: ClassVar[ |
| 5173 | + Callable[ |
| 5174 | + [ |
| 5175 | + "MatchMapping", |
| 5176 | + AssignName, |
| 5177 | + Optional[InferenceContext], |
| 5178 | + Literal[None], |
| 5179 | + ], |
| 5180 | + Generator[NodeNG, None, None], |
| 5181 | + ] |
5171 | 5182 | ]
|
5172 | 5183 | """Returns the assigned statement (non inferred) according to the assignment type.
|
5173 | 5184 | See astroid/protocols.py for actual implementation.
|
@@ -5265,14 +5276,16 @@ def __init__(
|
5265 | 5276 | def postinit(self, *, name: Optional[AssignName]) -> None:
|
5266 | 5277 | self.name = name
|
5267 | 5278 |
|
5268 |
| - assigned_stmts: Callable[ |
5269 |
| - [ |
5270 |
| - "MatchStar", |
5271 |
| - AssignName, |
5272 |
| - Optional[InferenceContext], |
5273 |
| - Literal[None], |
5274 |
| - ], |
5275 |
| - Generator[NodeNG, None, None], |
| 5279 | + assigned_stmts: ClassVar[ |
| 5280 | + Callable[ |
| 5281 | + [ |
| 5282 | + "MatchStar", |
| 5283 | + AssignName, |
| 5284 | + Optional[InferenceContext], |
| 5285 | + Literal[None], |
| 5286 | + ], |
| 5287 | + Generator[NodeNG, None, None], |
| 5288 | + ] |
5276 | 5289 | ]
|
5277 | 5290 | """Returns the assigned statement (non inferred) according to the assignment type.
|
5278 | 5291 | See astroid/protocols.py for actual implementation.
|
@@ -5334,14 +5347,16 @@ def postinit(
|
5334 | 5347 | self.pattern = pattern
|
5335 | 5348 | self.name = name
|
5336 | 5349 |
|
5337 |
| - assigned_stmts: Callable[ |
5338 |
| - [ |
5339 |
| - "MatchAs", |
5340 |
| - AssignName, |
5341 |
| - Optional[InferenceContext], |
5342 |
| - Literal[None], |
5343 |
| - ], |
5344 |
| - Generator[NodeNG, None, None], |
| 5350 | + assigned_stmts: ClassVar[ |
| 5351 | + Callable[ |
| 5352 | + [ |
| 5353 | + "MatchAs", |
| 5354 | + AssignName, |
| 5355 | + Optional[InferenceContext], |
| 5356 | + Literal[None], |
| 5357 | + ], |
| 5358 | + Generator[NodeNG, None, None], |
| 5359 | + ] |
5345 | 5360 | ]
|
5346 | 5361 | """Returns the assigned statement (non inferred) according to the assignment type.
|
5347 | 5362 | See astroid/protocols.py for actual implementation.
|
|
0 commit comments