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 +lambda a, b, c=True, *, d=(1 << v2), e="str": a
28 +lambda a, b, c=True, *vararg, d=(v1 << 2), e="str", **kwargs: a + b
30 str or None if True else str or bytes or None
31 (str or None) if True else (str or bytes or None)
32 str or None if (1 if True else 2) else str or bytes or None
33 (str or None) if (1 if True else 2) else (str or bytes or None)
34 -{'2.7': dead, '3.7': (long_live or die_hard)}
35 -{'2.7': dead, '3.7': (long_live or die_hard), **{'3.6': verygood}}
36 +{"2.7": dead, "3.7": (long_live or die_hard)}
37 +{"2.7": dead, "3.7": (long_live or die_hard), **{"3.6": verygood}}
39 -{'2.7', '3.6', '3.7', '3.8', '3.9', ('4.0' if gilectomy else '3.10')}
40 -({'a': 'b'}, (True or False), (+value), 'string', b'bytes') or None
41 +{"2.7", "3.6", "3.7", "3.8", "3.9", ("4.0" if gilectomy else "3.10")}
42 +({"a": "b"}, (True or False), (+value), "string", b"bytes") or None
48 [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
51 {i for i in (1, 2, 3)}
52 {(i ** 2) for i in (1, 2, 3)}
53 -{(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
54 +{(i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))}
55 {((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
56 [i for i in (1, 2, 3)]
57 [(i ** 2) for i in (1, 2, 3)]
58 -[(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
59 +[(i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))]
60 [((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
61 {i: 0 for i in (1, 2, 3)}
62 -{i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
63 +{i: j for i, j in ((1, "a"), (2, "b"), (3, "c"))}
64 {a: b * 2 for a, b in dictionary.items()}
65 {a: b * -2 for a, b in dictionary.items()}
66 -{k: v for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension}
69 + for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension
71 Python3 > Python2 > COBOL
76 -call(arg, kwarg='hey')
77 -call(arg, another, kwarg='hey', **kwargs)
78 -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
80 +call(arg, kwarg="hey")
81 +call(arg, another, kwarg="hey", **kwargs)
83 + this_is_a_very_long_variable_which_will_force_a_delimiter_split,
88 +) # note: no trailing comma pre-3.6
90 call(**self.screen_kwargs)
99 -tuple[str, int, float, dict[str, int],]
100 +tuple[str, int, float, dict[str, int]]
101 very_long_variable_name_filters: t.List[
102 t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
106 @@ -114,79 +123,113 @@
111 (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
112 -{'2.7': dead, '3.7': long_live or die_hard}
113 -{'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
114 +{"2.7": dead, "3.7": long_live or die_hard}
115 +{"2.7", "3.6", "3.7", "3.8", "3.9", "4.0" if gilectomy else "3.10"}
116 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
120 (i for i in (1, 2, 3))
121 ((i ** 2) for i in (1, 2, 3))
122 -((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
123 +((i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
124 (((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
126 -{"id": "1","type": "type","started_at": now(),"ended_at": now() + timedelta(days=10),"priority": 1,"import_session_id": 1,**kwargs} # no trailing comma, this file is not 3.6+
130 + "started_at": now(),
131 + "ended_at": now() + timedelta(days=10),
133 + "import_session_id": 1,
135 +} # no trailing comma, this file is not 3.6+
141 -what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove)
142 -what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove)
143 -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()
144 +what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
147 +what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(
150 +result = session.query(models.Customer.id).filter(
151 + models.Customer.account_id == account_id, models.Customer.email == email_address
153 + models.Customer.id.asc()
156 authors.łukasz.say_thanks()
160 yield from outside_of_generator
166 await some.complicated[0].call(with_args=(True or (1 is not 1)))
167 -for x, in (1,), (2,), (3,): ...
169 -for z in (i for i in (1, 2, 3)): ...
170 -for i in (call()): ...
171 -for j in (1 + (2 + 3)): ...
172 -while(this and that): ...
174 - threading.current_thread() != threading.main_thread() and
175 - threading.current_thread() != threading.main_thread() or
176 - signal.getsignal(signal.SIGINT) != signal.default_int_handler
180 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
181 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
185 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
186 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
190 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
191 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
195 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -
196 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
200 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *
201 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
205 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /
206 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
211 +for (x,) in (1,), (2,), (3,):
215 +for z in (i for i in (1, 2, 3)):
219 +for j in 1 + (2 + 3):
221 +while this and that:
224 + threading.current_thread() != threading.main_thread()
225 + and threading.current_thread() != threading.main_thread()
226 + or signal.getsignal(signal.SIGINT) != signal.default_int_handler
231 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
232 + | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
237 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
238 + & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
243 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
244 + + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
249 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
250 + - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
255 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
256 + * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
261 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
262 + / aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
267 # standalone comment at ENDMARKER