summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2023-02-07 21:39:14 +0100
committerGitHub <noreply@github.com>2023-02-07 21:39:14 +0100
commit70f7e3af68cb9e4878f6bc8c7da3de32c714d0a0 (patch)
tree2f40ac78dbf9651f5fd53f5c4bf5d3a10d14451f /tests
parent219ad3355d2320aa8d291c1ed0cd4c6163c1bbee (diff)
downloadpylint-git-70f7e3af68cb9e4878f6bc8c7da3de32c714d0a0.tar.gz
Fix crash when an attribute node was used inside an unary op (#8209)
Closes #8207
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/r/regression_02/regression_8207.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/functional/r/regression_02/regression_8207.py b/tests/functional/r/regression_02/regression_8207.py
new file mode 100644
index 000000000..6538018bc
--- /dev/null
+++ b/tests/functional/r/regression_02/regression_8207.py
@@ -0,0 +1,14 @@
+"""Regression test for 8207."""
+
+# pylint: disable=missing-docstring,too-few-public-methods
+
+class Example:
+ def __init__(self):
+ self.offset = -10
+
+ def minus_offset(self):
+ return {
+ (x, x): value
+ for x, row in enumerate([(5, 10), (20, 30)])
+ for y, value in enumerate(row, -self.offset)
+ }