@@ -1319,6 +1319,14 @@ def visit(self, node: ast3.expr) -> ProperType: ...
1319
1319
@overload
1320
1320
def visit (self , node : Optional [AST ]) -> Optional [ProperType ]: ...
1321
1321
1322
+ @overload
1323
+ def visit (self , node : ast3 .expr ,
1324
+ is_type_comment : Optional [bool ]) -> ProperType : ...
1325
+
1326
+ @overload
1327
+ def visit (self , node : Optional [AST ],
1328
+ is_type_comment : Optional [bool ]) -> Optional [ProperType ]: ...
1329
+
1322
1330
def visit (self , node : Optional [AST ],
1323
1331
is_type_comment : Optional [bool ] = False ) -> Optional [ProperType ]:
1324
1332
"""Modified visit -- keep track of the stack of nodes"""
@@ -1426,7 +1434,7 @@ def _extract_argument_name(self, n: ast3.expr) -> Optional[str]:
1426
1434
def visit_Name (self , n : Name ) -> Type :
1427
1435
return UnboundType (n .id , line = self .line , column = self .convert_column (n .col_offset ))
1428
1436
1429
- def visit_BinOp (self , n : ast3 .BinOp , is_type_comment : Optional [ bool ] = False ) -> Type :
1437
+ def visit_BinOp (self , n : ast3 .BinOp , is_type_comment : bool = False ) -> Type :
1430
1438
if not isinstance (n .op , ast3 .BitOr ):
1431
1439
return self .invalid_type (n )
1432
1440
0 commit comments