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.
1 # flags: --preview --minimum-version=3.10
2 # This has always worked
3 z= Loooooooooooooooooooooooong | Loooooooooooooooooooooooong | Loooooooooooooooooooooooong | Loooooooooooooooooooooooong
5 # "AnnAssign"s now also work
6 z: Loooooooooooooooooooooooong | Loooooooooooooooooooooooong | Loooooooooooooooooooooooong | Loooooooooooooooooooooooong
15 z: Loooooooooooooooooooooooong | Loooooooooooooooooooooooong | Loooooooooooooooooooooooong | Loooooooooooooooooooooooong = 7
23 # In case I go for not enforcing parantheses, this might get improved at the same time
26 == 9999999999999999999999999999999999999999
27 | 9999999999999999999999999999999999999999
28 | 9999999999999999999999999999999999999999
29 | 9999999999999999999999999999999999999999,
31 == 9999999999999999999999999999999999999999
32 + 9999999999999999999999999999999999999999
33 + 9999999999999999999999999999999999999999
34 + 9999999999999999999999999999999999999999,
38 z == (9999999999999999999999999999999999999999
39 | 9999999999999999999999999999999999999999
40 | 9999999999999999999999999999999999999999
41 | 9999999999999999999999999999999999999999),
42 y == (9999999999999999999999999999999999999999
43 + 9999999999999999999999999999999999999999
44 + 9999999999999999999999999999999999999999
45 + 9999999999999999999999999999999999999999),
48 # handle formatting of "tname"s in parameter list
50 # remove unnecessary paren
51 def foo(i: (int)) -> None: ...
54 # this is a syntax error in the type annotation according to mypy, but it's not invalid *python* code, so make sure we don't mess with it and make it so.
55 def foo(i: (int,)) -> None: ...
59 x: Loooooooooooooooooooooooong
60 | Looooooooooooooooong
61 | Looooooooooooooooooooong
72 | None = Query(None, title="Some long title", description="Some long description")
80 None, help="Maximum number of jobs to launch. And some additional text."
82 another_option: bool = False
88 # This has always worked
90 Loooooooooooooooooooooooong
91 | Loooooooooooooooooooooooong
92 | Loooooooooooooooooooooooong
93 | Loooooooooooooooooooooooong
96 # "AnnAssign"s now also work
98 Loooooooooooooooooooooooong
99 | Loooooooooooooooooooooooong
100 | Loooooooooooooooooooooooong
101 | Loooooooooooooooooooooooong
103 z: Short | Short2 | Short3 | Short4
109 Loooooooooooooooooooooooong
110 | Loooooooooooooooooooooooong
111 | Loooooooooooooooooooooooong
112 | Loooooooooooooooooooooooong
114 z: Short | Short2 | Short3 | Short4 = 8
118 # In case I go for not enforcing parantheses, this might get improved at the same time
121 == 9999999999999999999999999999999999999999
122 | 9999999999999999999999999999999999999999
123 | 9999999999999999999999999999999999999999
124 | 9999999999999999999999999999999999999999,
126 == 9999999999999999999999999999999999999999
127 + 9999999999999999999999999999999999999999
128 + 9999999999999999999999999999999999999999
129 + 9999999999999999999999999999999999999999,
135 9999999999999999999999999999999999999999
136 | 9999999999999999999999999999999999999999
137 | 9999999999999999999999999999999999999999
138 | 9999999999999999999999999999999999999999
142 9999999999999999999999999999999999999999
143 + 9999999999999999999999999999999999999999
144 + 9999999999999999999999999999999999999999
145 + 9999999999999999999999999999999999999999
149 # handle formatting of "tname"s in parameter list
152 # remove unnecessary paren
153 def foo(i: int) -> None: ...
156 # this is a syntax error in the type annotation according to mypy, but it's not invalid *python* code, so make sure we don't mess with it and make it so.
157 def foo(i: (int,)) -> None: ...
163 Loooooooooooooooooooooooong
164 | Looooooooooooooooong
165 | Looooooooooooooooooooong
176 q: str | None = Query(
177 None, title="Some long title", description="Some long description"
184 max_jobs: int | None = Option(
185 None, help="Maximum number of jobs to launch. And some additional text."
187 another_option: bool = False,