]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/black/tests/data/cases/pattern_matching_style.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:

Merge commit '882d8795c6ff65c02f2657e596391748d1b6b7f5'
[etc/vim.git] / .vim / bundle / black / tests / data / cases / pattern_matching_style.py
1 # flags: --minimum-version=3.10
2 match something:
3     case b(): print(1+1)
4     case c(
5         very_complex=True,
6         perhaps_even_loooooooooooooooooooooooooooooooooooooong=-   1
7     ): print(1)
8     case c(
9         very_complex=True,
10         perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1,
11     ): print(2)
12     case a: pass
13
14 match(
15     arg # comment
16 )
17
18 match(
19 )
20
21 match(
22
23
24 )
25
26 case(
27     arg # comment
28 )
29
30 case(
31 )
32
33 case(
34
35
36 )
37
38
39 re.match(
40     something # fast
41 )
42 re.match(
43
44
45
46 )
47 match match(
48
49
50 ):
51     case case(
52         arg, # comment
53     ):
54         pass
55
56 # output
57
58 match something:
59     case b():
60         print(1 + 1)
61     case c(
62         very_complex=True, perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1
63     ):
64         print(1)
65     case c(
66         very_complex=True,
67         perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1,
68     ):
69         print(2)
70     case a:
71         pass
72
73 match(arg)  # comment
74
75 match()
76
77 match()
78
79 case(arg)  # comment
80
81 case()
82
83 case()
84
85
86 re.match(something)  # fast
87 re.match()
88 match match():
89     case case(
90         arg,  # comment
91     ):
92         pass