Skip to content

Commit

Permalink
Fix bizarre failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Feb 1, 2025
1 parent cd354ae commit 854141e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pylint/checkers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,13 @@ def is_augmented_assign(node: nodes.Assign) -> tuple[bool, str]:
binop.op in COMMUTATIVE_OPERATORS
and _is_target_name_in_binop_side(target, binop.right)
):
inferred_left = safe_infer(binop.left)
if isinstance(binop.left, nodes.Const):
# This bizarrely became necessary after an unrelated call to igetattr().

Check notice on line 2151 in pylint/checkers/utils.py

View workflow job for this annotation

GitHub Actions / pylint

C0401

Wrong spelling of a word 'igetattr' in a comment:
# Seems like a code smell uncovered in #10212.
# tuple(node.frame().igetattr(node.name))

Check notice on line 2153 in pylint/checkers/utils.py

View workflow job for this annotation

GitHub Actions / pylint

C0401

Wrong spelling of a word 'igetattr' in a comment:
inferred_left = binop.left
else:
inferred_left = safe_infer(binop.left)
if isinstance(inferred_left, nodes.Const) and isinstance(
inferred_left.value, int
):
Expand Down

0 comments on commit 854141e

Please sign in to comment.