52
52
ClassVar ,
53
53
Generator ,
54
54
Optional ,
55
+ Type ,
55
56
TypeVar ,
56
57
Union ,
57
58
)
@@ -685,7 +686,7 @@ def __init__(
685
686
self .kwarg : Optional [str ] = kwarg # can be None
686
687
"""The name of the variable length keyword arguments."""
687
688
688
- self .args : typing . Optional [typing .List [AssignName ]]
689
+ self .args : Optional [typing .List [AssignName ]]
689
690
"""The names of the required arguments.
690
691
691
692
Can be None if the associated function does not have a retrievable
@@ -1935,7 +1936,7 @@ class Const(mixins.NoChildrenMixin, NodeNG, Instance):
1935
1936
1936
1937
def __init__ (
1937
1938
self ,
1938
- value : typing . Any ,
1939
+ value : Any ,
1939
1940
lineno : Optional [int ] = None ,
1940
1941
col_offset : Optional [int ] = None ,
1941
1942
parent : Optional [NodeNG ] = None ,
@@ -1961,7 +1962,7 @@ def __init__(
1961
1962
:param end_col_offset: The end column this node appears on in the
1962
1963
source code. Note: This is after the last symbol.
1963
1964
"""
1964
- self .value : typing . Any = value
1965
+ self .value : Any = value
1965
1966
"""The value that the constant represents."""
1966
1967
1967
1968
self .kind : Optional [str ] = kind # can be None
@@ -4100,7 +4101,7 @@ def __init__(
4100
4101
:param end_col_offset: The end column this node appears on in the
4101
4102
source code. Note: This is after the last symbol.
4102
4103
"""
4103
- self .body : typing .Union [ typing . List [TryExcept ], typing . List [NodeNG ]] = []
4104
+ self .body : typing .List [Union [NodeNG , TryExcept ]] = []
4104
4105
"""The try-except that the finally is attached to."""
4105
4106
4106
4107
self .finalbody : typing .List [NodeNG ] = []
@@ -4116,7 +4117,7 @@ def __init__(
4116
4117
4117
4118
def postinit (
4118
4119
self ,
4119
- body : typing . Union [typing .List [TryExcept ], typing . List [NodeNG ], None ] = None ,
4120
+ body : Optional [typing .List [Union [NodeNG , TryExcept ]] ] = None ,
4120
4121
finalbody : Optional [typing .List [NodeNG ]] = None ,
4121
4122
) -> None :
4122
4123
"""Do some setup after initialisation.
@@ -4899,12 +4900,12 @@ class EvaluatedObject(NodeNG):
4899
4900
_other_fields = ("value" ,)
4900
4901
4901
4902
def __init__ (
4902
- self , original : NodeNG , value : typing . Union [NodeNG , util .Uninferable ]
4903
+ self , original : NodeNG , value : Union [NodeNG , Type [ util .Uninferable ] ]
4903
4904
) -> None :
4904
4905
self .original : NodeNG = original
4905
4906
"""The original node that has already been evaluated"""
4906
4907
4907
- self .value : typing . Union [NodeNG , util .Uninferable ] = value
4908
+ self .value : Union [NodeNG , Type [ util .Uninferable ] ] = value
4908
4909
"""The inferred value"""
4909
4910
4910
4911
super ().__init__ (
@@ -5182,7 +5183,7 @@ def postinit(
5182
5183
"MatchMapping" ,
5183
5184
AssignName ,
5184
5185
Optional [InferenceContext ],
5185
- Literal [ None ] ,
5186
+ None ,
5186
5187
],
5187
5188
Generator [NodeNG , None , None ],
5188
5189
]
@@ -5289,7 +5290,7 @@ def postinit(self, *, name: Optional[AssignName]) -> None:
5289
5290
"MatchStar" ,
5290
5291
AssignName ,
5291
5292
Optional [InferenceContext ],
5292
- Literal [ None ] ,
5293
+ None ,
5293
5294
],
5294
5295
Generator [NodeNG , None , None ],
5295
5296
]
@@ -5360,7 +5361,7 @@ def postinit(
5360
5361
"MatchAs" ,
5361
5362
AssignName ,
5362
5363
Optional [InferenceContext ],
5363
- Literal [ None ] ,
5364
+ None ,
5364
5365
],
5365
5366
Generator [NodeNG , None , None ],
5366
5367
]
0 commit comments