summaryrefslogtreecommitdiff
path: root/tests/functional/t
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2022-05-01 21:26:23 -0400
committerGitHub <noreply@github.com>2022-05-01 21:26:23 -0400
commita75006951fe43fa1b7df8c810b33b1d5e39f4261 (patch)
tree438fc34f85eba064253aa0f4d87955442c30d2d3 /tests/functional/t
parent1dcb90a552432bcdc67f8f7b241ac3cd746ebe7d (diff)
downloadpylint-git-a75006951fe43fa1b7df8c810b33b1d5e39f4261.tar.gz
Add optional check `redefined-loop-name` (#5649)
* Also change message type for inner loops overwriting the outer loop variable from `redefined-outer-name` to `redefined-loop-name` * Update redefined-outer-name description * Add coverage and fix preexisting false positive When the check for inner loops redefining outer loop variables was redefined-outer-name, it assumed enclosing for-loops were in the same namespace. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Diffstat (limited to 'tests/functional/t')
-rw-r--r--tests/functional/t/too/too_many_nested_blocks.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/functional/t/too/too_many_nested_blocks.py b/tests/functional/t/too/too_many_nested_blocks.py
index e7c007957..24c8fe4ef 100644
--- a/tests/functional/t/too/too_many_nested_blocks.py
+++ b/tests/functional/t/too/too_many_nested_blocks.py
@@ -9,7 +9,7 @@ def my_function():
while True:
try:
if True:
- i += 1
+ print(i)
except IOError:
pass
@@ -18,7 +18,7 @@ def my_function():
if i == 2:
while True:
try:
- i += 1
+ print(i)
except IOError:
pass