Skip to content

Commit

Permalink
Add long line tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jpy-git committed Mar 24, 2022
1 parent 5db666d commit 62c55b7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/data/remove_for_brackets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
if hasattr(module, "_verify_python3_env"):
module._verify_python3_env = lambda: None

# Brackets remain for long for loop lines
for (why_would_anyone_choose_to_name_a_loop_variable_with_a_name_this_long, i_dont_know_but_we_should_still_check_the_behaviour_if_they_do) in d.items():
print(k, v)

for (k, v) in dfkasdjfldsjflkdsjflkdsjfdslkfjldsjfgkjdshgkljjdsfldgkhsdofudsfudsofajdslkfjdslkfjldisfjdffjsdlkfjdlkjjkdflskadjldkfjsalkfjdasj.items():
print(k, v)

# output
# Only remove tuple brackets after `for`
for k, v in d.items():
Expand All @@ -16,3 +23,18 @@
for module in (core, _unicodefun):
if hasattr(module, "_verify_python3_env"):
module._verify_python3_env = lambda: None

# Brackets remain for long for loop lines
for (
why_would_anyone_choose_to_name_a_loop_variable_with_a_name_this_long,
i_dont_know_but_we_should_still_check_the_behaviour_if_they_do,
) in d.items():
print(k, v)

for (
k,
v,
) in (
dfkasdjfldsjflkdsjflkdsjfdslkfjldsjfgkjdshgkljjdsfldgkhsdofudsfudsofajdslkfjdslkfjldisfjdffjsdlkfjdlkjjkdflskadjldkfjsalkfjdasj.items()
):
print(k, v)

0 comments on commit 62c55b7

Please sign in to comment.