summaryrefslogtreecommitdiff
path: root/pylint
diff options
context:
space:
mode:
authorDani Alcala <112832187+clavedeluna@users.noreply.github.com>2022-09-23 16:11:37 -0300
committerGitHub <noreply@github.com>2022-09-23 21:11:37 +0200
commitca6648a909a7c583cc6c210bcaa126b4f6fb1f3b (patch)
tree3c2b6b631226b3b76e5befaa900520341bd845fa /pylint
parentb418a7f2a4e6c5960bb8fd05d78412ca46c47471 (diff)
downloadpylint-git-ca6648a909a7c583cc6c210bcaa126b4f6fb1f3b.tar.gz
Fix false negative ``no-member`` when the code was a `manual` augmented assignments (#7509)
Diffstat (limited to 'pylint')
-rw-r--r--pylint/checkers/typecheck.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py
index aabda2229..081d9cd22 100644
--- a/pylint/checkers/typecheck.py
+++ b/pylint/checkers/typecheck.py
@@ -1160,6 +1160,9 @@ accessed. Python regular expressions are accepted.",
try:
if isinstance(
attr_node.statement(future=True), nodes.AugAssign
+ ) or (
+ isinstance(attr_parent, nodes.Assign)
+ and utils.is_augmented_assign(attr_parent)[0]
):
continue
except astroid.exceptions.StatementMissing: