Skip to content

Commit

Permalink
Fix existing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed Aug 12, 2021
1 parent ba9ba45 commit 941dd78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
(x for x in var)
(x for x in (1, 2, 3))
(x for x in [1, 2, 3]) # [consider-using-tuple]
(x for x in {1, 2, 3}) # [consider-using-tuple]
(x for x in {1, 2, 3}) # [consider-using-tuple,use-sequence-for-iteration]

[x for x in var]
[x for x in (1, 2, 3)]
Expand All @@ -26,4 +26,4 @@
pass

[x for x in [*var, 2]]
[x for x in {*var, 2}]
[x for x in {*var, 2}] # [use-sequence-for-iteration]
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
consider-using-tuple:9:9::Consider using an in-place tuple instead of list
consider-using-tuple:14:12::Consider using an in-place tuple instead of list
consider-using-tuple:15:12::Consider using an in-place tuple instead of set
use-sequence-for-iteration:15:12::Use a sequence type when iterating over values
consider-using-tuple:19:12::Consider using an in-place tuple instead of list
use-sequence-for-iteration:29:12::Use a sequence type when iterating over values
2 changes: 1 addition & 1 deletion tests/functional/u/undefined/undefined_loop_variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def do_stuff_with_a_list():


def do_stuff_with_a_set():
for var in {1, 2, 3}:
for var in {1, 2, 3}: # pylint: disable=use-sequence-for-iteration
pass
return var

Expand Down

0 comments on commit 941dd78

Please sign in to comment.