diff options
| author | Andrew Simmons <a.simmons@deakin.edu.au> | 2020-04-21 05:38:37 +1000 |
|---|---|---|
| committer | Claudiu Popa <pcmanticore@gmail.com> | 2020-04-22 08:26:43 +0200 |
| commit | 0ea3410d670246cb8b961e99ec474f7f7b95f4ce (patch) | |
| tree | a0be52b84ff0eb2f52a3ad4646246f70f08fa046 /tests/functional/c/class_scope.py | |
| parent | aa1940e35a8c78cc362f112b6bf498f97ee6640d (diff) | |
| download | pylint-git-0ea3410d670246cb8b961e99ec474f7f7b95f4ce.tar.gz | |
Fix false negative for undefined-variable when using class attribute in comprehension (#3494)
Diffstat (limited to 'tests/functional/c/class_scope.py')
| -rw-r--r-- | tests/functional/c/class_scope.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/functional/c/class_scope.py b/tests/functional/c/class_scope.py index 309ebd6da..527e5efa2 100644 --- a/tests/functional/c/class_scope.py +++ b/tests/functional/c/class_scope.py @@ -7,10 +7,11 @@ class Well(object): """well""" attr = 42 get_attr = lambda arg=attr: arg * 24 - # +1: [used-before-assignment] + # +1: [undefined-variable, used-before-assignment] get_attr_bad = lambda arg=revattr: revattr * 42 revattr = 24 bad_lambda = lambda: get_attr_bad # [undefined-variable] + bad_gen = list(attr + i for i in range(10)) # [undefined-variable] class Data(object): """base hidden class""" |
