Skip to content

Commit a4fba62

Browse files
committed
Bugfix 3
1 parent 3335f79 commit a4fba62

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mypy/fastparse.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,6 @@ def fix_function_overloads(self, stmts: List[Statement]) -> List[Statement]:
461461
current_overload_name is not None
462462
and isinstance(stmt, IfStmt)
463463
and len(stmt.body[0].body) == 1
464-
# and isinstance(stmt.else_body, Block)
465-
# and len(stmt.else_body.body) == 0
466464
and isinstance(
467465
stmt.body[0].body[0], (Decorator, FuncDef, OverloadedFuncDef))
468466
and stmt.body[0].body[0].name == current_overload_name
@@ -508,6 +506,7 @@ def fix_function_overloads(self, stmts: List[Statement]) -> List[Statement]:
508506
) is None # type: ignore[func-returns-value]
509507
and stmt.body[0].is_unreachable is False
510508
):
509+
current_overload = []
511510
current_overload_name = stmt.body[0].body[0].name
512511
last_if_stmt = stmt
513512
last_if_overload = stmt.body[0].body[0]

0 commit comments

Comments
 (0)