]> git.madduck.net Git - etc/vim.git/blob - tests/data/remove_for_brackets.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Keep tests working w/ upcoming aiohttp 4.0.0 (#2974)
[etc/vim.git] / tests / data / remove_for_brackets.py
1 # Only remove tuple brackets after `for`
2 for (k, v) in d.items():
3     print(k, v)
4
5 # Don't touch tuple brackets after `in`
6 for module in (core, _unicodefun):
7     if hasattr(module, "_verify_python3_env"):
8         module._verify_python3_env = lambda: None
9
10 # Brackets remain for long for loop lines
11 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():
12     print(k, v)
13
14 for (k, v) in dfkasdjfldsjflkdsjflkdsjfdslkfjldsjfgkjdshgkljjdsfldgkhsdofudsfudsofajdslkfjdslkfjldisfjdffjsdlkfjdlkjjkdflskadjldkfjsalkfjdasj.items():
15     print(k, v)
16
17 # output
18 # Only remove tuple brackets after `for`
19 for k, v in d.items():
20     print(k, v)
21
22 # Don't touch tuple brackets after `in`
23 for module in (core, _unicodefun):
24     if hasattr(module, "_verify_python3_env"):
25         module._verify_python3_env = lambda: None
26
27 # Brackets remain for long for loop lines
28 for (
29     why_would_anyone_choose_to_name_a_loop_variable_with_a_name_this_long,
30     i_dont_know_but_we_should_still_check_the_behaviour_if_they_do,
31 ) in d.items():
32     print(k, v)
33
34 for (
35     k,
36     v,
37 ) in (
38     dfkasdjfldsjflkdsjflkdsjfdslkfjldsjfgkjdshgkljjdsfldgkhsdofudsfudsofajdslkfjdslkfjldisfjdffjsdlkfjdlkjjkdflskadjldkfjsalkfjdasj.items()
39 ):
40     print(k, v)