Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed Nov 1, 2020
1 parent 20e17ee commit 9eb9198
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions mypy/fastparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -1320,15 +1320,12 @@ def visit(self, node: ast3.expr) -> ProperType: ...
def visit(self, node: Optional[AST]) -> Optional[ProperType]: ...

@overload
def visit(self, node: ast3.expr,
is_type_comment: Optional[bool]) -> ProperType: ...
def visit(self, node: ast3.expr, is_type_comment: bool) -> ProperType: ...

@overload
def visit(self, node: Optional[AST],
is_type_comment: Optional[bool]) -> Optional[ProperType]: ...
def visit(self, node: Optional[AST], is_type_comment: bool) -> Optional[ProperType]: ...

def visit(self, node: Optional[AST],
is_type_comment: Optional[bool] = False) -> Optional[ProperType]:
def visit(self, node: Optional[AST], is_type_comment: bool = False) -> Optional[ProperType]:
"""Modified visit -- keep track of the stack of nodes"""
if node is None:
return None
Expand Down

0 comments on commit 9eb9198

Please sign in to comment.