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

Consolidate test CI and add concurrency limits (#3189)
[etc/vim.git] / tests / data / simple_cases / fmtskip8.py
1 # Make sure a leading comment is not removed.
2 def some_func(  unformatted,  args  ):  # fmt: skip
3     print("I am some_func")
4     return 0
5     # Make sure this comment is not removed.
6
7
8 # Make sure a leading comment is not removed.
9 async def some_async_func(  unformatted,   args):  # fmt: skip
10     print("I am some_async_func")
11     await asyncio.sleep(1)
12
13
14 # Make sure a leading comment is not removed.
15 class SomeClass(  Unformatted,  SuperClasses  ):  # fmt: skip
16     def some_method(  self,  unformatted,  args  ):  # fmt: skip
17         print("I am some_method")
18         return 0
19
20     async def some_async_method(  self,  unformatted,  args  ):  # fmt: skip
21         print("I am some_async_method")
22         await asyncio.sleep(1)
23
24
25 # Make sure a leading comment is not removed.
26 if  unformatted_call(  args  ):  # fmt: skip
27     print("First branch")
28     # Make sure this is not removed.
29 elif  another_unformatted_call(  args  ):  # fmt: skip
30     print("Second branch")
31 else  :  # fmt: skip
32     print("Last branch")
33
34
35 while  some_condition(  unformatted,  args  ):  # fmt: skip
36     print("Do something")
37
38
39 for  i  in  some_iter(  unformatted,  args  ):  # fmt: skip
40     print("Do something")
41
42
43 async def test_async_for():
44     async  for  i  in  some_async_iter(  unformatted,  args  ):  # fmt: skip
45         print("Do something")
46
47
48 try  :  # fmt: skip
49     some_call()
50 except  UnformattedError  as  ex:  # fmt: skip
51     handle_exception()
52 finally  :  # fmt: skip
53     finally_call()
54
55
56 with  give_me_context(  unformatted,  args  ):  # fmt: skip
57     print("Do something")
58
59
60 async def test_async_with():
61     async  with  give_me_async_context(  unformatted,  args  ):  # fmt: skip
62         print("Do something")