diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2021-12-11 03:10:28 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-11 09:10:28 +0100 |
| commit | bd55b27d41542e3ca1f031f986b6151f6cac457f (patch) | |
| tree | 4600946172fe87d234cae6cf784ee66734cf3362 /tests/functional/u/undefined/undefined_variable.py | |
| parent | a51a5486ebff7543ae4fb6943fac2558947fa974 (diff) | |
| download | pylint-git-bd55b27d41542e3ca1f031f986b6151f6cac457f.tar.gz | |
Fix #4761: Emit `used-before-assignment` where single assignment only made in except blocks (#5402)
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests/functional/u/undefined/undefined_variable.py')
| -rw-r--r-- | tests/functional/u/undefined/undefined_variable.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/functional/u/undefined/undefined_variable.py b/tests/functional/u/undefined/undefined_variable.py index f4f22e523..6ce9aaa6e 100644 --- a/tests/functional/u/undefined/undefined_variable.py +++ b/tests/functional/u/undefined/undefined_variable.py @@ -35,7 +35,7 @@ LMBD = lambda x, y=doesnotexist: x+y # [undefined-variable] LMBD2 = lambda x, y: x+z # [undefined-variable] try: - POUET # don't catch me + POUET # [used-before-assignment] except NameError: POUET = 'something' @@ -45,7 +45,7 @@ except Exception: # pylint:disable = broad-except POUETT = 'something' try: - POUETTT # don't catch me + POUETTT # [used-before-assignment] except: # pylint:disable = bare-except POUETTT = 'something' |
