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.
2 +++ <stdin> (formatted)
18 ~int and not v1 ^ 123 + v2 | True
19 (~int) and (not ((v1 ^ (123 + v2)) | True))
20 -flags & ~ select.EPOLLIN and waiters.write_task is not None
21 +flags & ~select.EPOLLIN and waiters.write_task is not None
24 lambda a, b, c=True: a
25 -lambda a, b, c=True, *, d=(1 << v2), e='str': a
26 -lambda a, b, c=True, *vararg, d=(v1 << 2), e='str', **kwargs: a + b
27 -foo = (lambda port_id, ignore_missing: {"port1": port1_resource, "port2": port2_resource}[port_id])
28 +lambda a, b, c=True, *, d=(1 << v2), e="str": a
29 +lambda a, b, c=True, *vararg, d=(v1 << 2), e="str", **kwargs: a + b
31 + lambda port_id, ignore_missing: {"port1": port1_resource, "port2": port2_resource}[
36 str or None if True else str or bytes or None
37 (str or None) if True else (str or bytes or None)
38 str or None if (1 if True else 2) else str or bytes or None
39 (str or None) if (1 if True else 2) else (str or bytes or None)
40 -{'2.7': dead, '3.7': (long_live or die_hard)}
41 -{'2.7': dead, '3.7': (long_live or die_hard), **{'3.6': verygood}}
42 +{"2.7": dead, "3.7": (long_live or die_hard)}
43 +{"2.7": dead, "3.7": (long_live or die_hard), **{"3.6": verygood}}
45 -{'2.7', '3.6', '3.7', '3.8', '3.9', ('4.0' if gilectomy else '3.10')}
46 -({'a': 'b'}, (True or False), (+value), 'string', b'bytes') or None
47 +{"2.7", "3.6", "3.7", "3.8", "3.9", ("4.0" if gilectomy else "3.10")}
48 +({"a": "b"}, (True or False), (+value), "string", b"bytes") or None
54 [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
61 -[this_is_a_very_long_variable_which_will_force_a_delimiter_split, element, another, *more]
65 + this_is_a_very_long_variable_which_will_force_a_delimiter_split,
70 {i for i in (1, 2, 3)}
71 {(i ** 2) for i in (1, 2, 3)}
72 -{(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
73 +{(i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))}
74 {((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
75 [i for i in (1, 2, 3)]
76 [(i ** 2) for i in (1, 2, 3)]
77 -[(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
78 +[(i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))]
79 [((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
80 {i: 0 for i in (1, 2, 3)}
81 -{i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
82 +{i: j for i, j in ((1, "a"), (2, "b"), (3, "c"))}
83 {a: b * 2 for a, b in dictionary.items()}
84 {a: b * -2 for a, b in dictionary.items()}
85 -{k: v for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension}
88 + for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension
90 Python3 > Python2 > COBOL
95 -call(arg, kwarg='hey')
96 -call(arg, another, kwarg='hey', **kwargs)
97 -call(this_is_a_very_long_variable_which_will_force_a_delimiter_split, arg, another, kwarg='hey', **kwargs) # note: no trailing comma pre-3.6
99 +call(arg, kwarg="hey")
100 +call(arg, another, kwarg="hey", **kwargs)
102 + this_is_a_very_long_variable_which_will_force_a_delimiter_split,
107 +) # note: no trailing comma pre-3.6
109 call(a, *gidgets[:2])
110 call(**self.screen_kwargs)
111 call(b, **self.screen_kwargs)
119 -tuple[str, int, float, dict[str, int],]
120 +tuple[str, int, float, dict[str, int]]
121 very_long_variable_name_filters: t.List[
122 t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
126 @@ -122,88 +140,122 @@
131 (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
132 -{'2.7': dead, '3.7': long_live or die_hard}
133 -{'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
134 +{"2.7": dead, "3.7": long_live or die_hard}
135 +{"2.7", "3.6", "3.7", "3.8", "3.9", "4.0" if gilectomy else "3.10"}
136 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
140 (i for i in (1, 2, 3))
141 ((i ** 2) for i in (1, 2, 3))
142 -((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
143 +((i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
144 (((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
146 -{"id": "1","type": "type","started_at": now(),"ended_at": now() + timedelta(days=10),"priority": 1,"import_session_id": 1,**kwargs}
150 + "started_at": now(),
151 + "ended_at": now() + timedelta(days=10),
153 + "import_session_id": 1,
161 -what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove)
162 -what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove)
163 -result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc(),).all()
164 +what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
167 +what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(
170 +result = session.query(models.Customer.id).filter(
171 + models.Customer.account_id == account_id, models.Customer.email == email_address
173 + models.Customer.id.asc()
176 authors.łukasz.say_thanks()
178 A: 0.25 * (10.0 / 12),
179 B: 0.1 * (10.0 / 12),
180 C: 0.1 * (10.0 / 12),
181 D: 0.1 * (10.0 / 12),
186 yield from outside_of_generator
192 await some.complicated[0].call(with_args=(True or (1 is not 1)))
197 print(**{1: 3} if False else {x: x for x in range(3)})
198 -print(* lambda x: x)
199 -for x, in (1,), (2,), (3,): ...
201 -for z in (i for i in (1, 2, 3)): ...
202 -for i in (call()): ...
203 -for j in (1 + (2 + 3)): ...
204 -while(this and that): ...
206 - threading.current_thread() != threading.main_thread() and
207 - threading.current_thread() != threading.main_thread() or
208 - signal.getsignal(signal.SIGINT) != signal.default_int_handler
212 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
213 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
217 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
218 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
222 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
223 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
227 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -
228 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
232 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *
233 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
237 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /
238 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
242 +for (x,) in (1,), (2,), (3,):
246 +for z in (i for i in (1, 2, 3)):
250 +for j in 1 + (2 + 3):
252 +while this and that:
255 + threading.current_thread() != threading.main_thread()
256 + and threading.current_thread() != threading.main_thread()
257 + or signal.getsignal(signal.SIGINT) != signal.default_int_handler
262 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
263 + | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
268 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
269 + & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
274 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
275 + + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
280 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
281 + - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
286 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
287 + * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
292 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
293 + / aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
298 # standalone comment at ENDMARKER