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

Drop support for parsing Python 2 (#3933)
[etc/vim.git] / tests / data / py_312 / type_params.py
1 def func  [T ](): pass
2 async def func [ T ] (): pass
3 class C[ T ] : pass
4
5 def all_in[T   :   int,U : (bytes, str),*   Ts,**P](): pass
6
7 def really_long[WhatIsTheLongestTypeVarNameYouCanThinkOfEnoughToMakeBlackSplitThisLine](): pass
8
9 def even_longer[WhatIsTheLongestTypeVarNameYouCanThinkOfEnoughToMakeBlackSplitThisLine: WhatIfItHadABound](): pass
10
11 def it_gets_worse[WhatIsTheLongestTypeVarNameYouCanThinkOfEnoughToMakeBlackSplitThisLine, ItCouldBeGenericOverMultipleTypeVars](): pass
12
13 def magic[Trailing, Comma,](): pass
14
15 # output
16
17
18 def func[T]():
19     pass
20
21
22 async def func[T]():
23     pass
24
25
26 class C[T]:
27     pass
28
29
30 def all_in[T: int, U: (bytes, str), *Ts, **P]():
31     pass
32
33
34 def really_long[
35     WhatIsTheLongestTypeVarNameYouCanThinkOfEnoughToMakeBlackSplitThisLine
36 ]():
37     pass
38
39
40 def even_longer[
41     WhatIsTheLongestTypeVarNameYouCanThinkOfEnoughToMakeBlackSplitThisLine: WhatIfItHadABound
42 ]():
43     pass
44
45
46 def it_gets_worse[
47     WhatIsTheLongestTypeVarNameYouCanThinkOfEnoughToMakeBlackSplitThisLine,
48     ItCouldBeGenericOverMultipleTypeVars,
49 ]():
50     pass
51
52
53 def magic[
54     Trailing,
55     Comma,
56 ]():
57     pass