Skip to content

Commit

Permalink
Assert instead of hint type
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Feb 7, 2022
1 parent 51dae8c commit 3f03bed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pylint/checkers/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,8 @@ def _uncertain_nodes_in_except_blocks(
# If the other node is in the same scope as this node, assume it executes
if closest_except_handler.parent_of(node):
continue
closest_try_except: nodes.TryExcept = closest_except_handler.parent
closest_try_except = closest_except_handler.parent
assert isinstance(closest_try_except, nodes.TryExcept)
try_block_returns = any(
isinstance(try_statement, nodes.Return)
for try_statement in closest_try_except.body
Expand Down

0 comments on commit 3f03bed

Please sign in to comment.