63
63
USub ,
64
64
)
65
65
def ast3_parse (source : Union [str , bytes ], filename : str , mode : str ,
66
- feature_version : int = sys .version_info [1 ]) -> ast3 . Module :
66
+ feature_version : int = sys .version_info [1 ]) -> AST :
67
67
return ast3 .parse (source , filename , mode ,
68
68
type_comments = True , # This works the magic
69
69
feature_version = feature_version )
@@ -89,7 +89,7 @@ def ast3_parse(source: Union[str, bytes], filename: str, mode: str,
89
89
USub ,
90
90
)
91
91
def ast3_parse (source : Union [str , bytes ], filename : str , mode : str ,
92
- feature_version : int = sys .version_info [1 ]) -> ast3 . AST :
92
+ feature_version : int = sys .version_info [1 ]) -> AST :
93
93
return ast3 .parse (source , filename , mode , feature_version = feature_version )
94
94
# These doesn't exist before 3.8
95
95
NamedExpr = Any
@@ -1328,7 +1328,7 @@ def visit_UnaryOp(self, n: UnaryOp) -> Type:
1328
1328
def visit_Num (self , n : Num ) -> Type :
1329
1329
return self .numeric_type (n .n , n )
1330
1330
1331
- def numeric_type (self , value : object , n : Node ) -> Type :
1331
+ def numeric_type (self , value : object , n : AST ) -> Type :
1332
1332
# The node's field has the type complex, but complex isn't *really*
1333
1333
# a parent of int and float, and this causes isinstance below
1334
1334
# to think that the complex branch is always picked. Avoid
0 commit comments