]> git.madduck.net Git - etc/vim.git/blob - tests/data/preview/trailing_commas_in_leading_parts.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:

Remove whitespaces of whitespace-only files (#3348)
[etc/vim.git] / tests / data / preview / trailing_commas_in_leading_parts.py
1 zero(one,).two(three,).four(five,)
2
3 func1(arg1).func2(arg2,).func3(arg3).func4(arg4,).func5(arg5)
4
5 # Inner one-element tuple shouldn't explode
6 func1(arg1).func2(arg1, (one_tuple,)).func3(arg3)
7
8 (a, b, c, d,) = func1(arg1) and func2(arg2)
9
10
11 # Example from https://github.com/psf/black/issues/3229
12 def refresh_token(self, device_family, refresh_token, api_key):
13     return self.orchestration.refresh_token(
14         data={
15             "refreshToken": refresh_token,
16         },
17         api_key=api_key,
18     )["extensions"]["sdk"]["token"]
19
20
21 # Edge case where a bug in a working-in-progress version of
22 # https://github.com/psf/black/pull/3370 causes an infinite recursion.
23 assert (
24     long_module.long_class.long_func().another_func()
25     == long_module.long_class.long_func()["some_key"].another_func(arg1)
26 )
27
28
29 # output
30
31
32 zero(
33     one,
34 ).two(
35     three,
36 ).four(
37     five,
38 )
39
40 func1(arg1).func2(
41     arg2,
42 ).func3(arg3).func4(
43     arg4,
44 ).func5(arg5)
45
46 # Inner one-element tuple shouldn't explode
47 func1(arg1).func2(arg1, (one_tuple,)).func3(arg3)
48
49 (
50     a,
51     b,
52     c,
53     d,
54 ) = func1(
55     arg1
56 ) and func2(arg2)
57
58
59 # Example from https://github.com/psf/black/issues/3229
60 def refresh_token(self, device_family, refresh_token, api_key):
61     return self.orchestration.refresh_token(
62         data={
63             "refreshToken": refresh_token,
64         },
65         api_key=api_key,
66     )["extensions"]["sdk"]["token"]
67
68
69 # Edge case where a bug in a working-in-progress version of
70 # https://github.com/psf/black/pull/3370 causes an infinite recursion.
71 assert (
72     long_module.long_class.long_func().another_func()
73     == long_module.long_class.long_func()["some_key"].another_func(arg1)
74 )