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.
5 from third_party import X, Y, Z
7 from library import some_connection, \
10 from third_party import (X,
17 if True: raise RuntimeError
22 exec('new-style exec', {}, {})
24 async def coroutine(arg, exec=False):
25 'Single-line docstring. Multiline is harder to reformat.'
26 async with some_connection() as conn:
27 await conn.do_what_i_mean('SELECT bobby, tables FROM xkcd', timeout=2)
28 await asyncio.sleep(1)
34 def function_signature_stress_test(number:int,no_annotation=None,text:str='default',* ,debug:bool=False,**kwargs) -> str:
35 return text[number:-1]
37 def spaces(a=1, b=(), c=[], d={}, e=True, f=-1, g=1 if False else 2, h="", i=r''):
38 offset = attr.ib(default=attr.Factory( lambda: _r.uniform(10000, 200000)))
39 assert task._cancel_stack[:len(old_stack)] == old_stack
40 def spaces_types(a: int = 1, b: tuple = (), c: list = [], d: dict = {}, e: bool = True, f: int = -1, g: int = 1 if False else 2, h: str = "", i: str = r''): ...
41 def spaces2(result= _core.Value(None)):
50 .query(models.Customer.id)\
51 .filter(models.Customer.account_id == account_id,
52 models.Customer.email == email_address)\
53 .order_by(models.Customer.id.asc())\
59 gen_annotated_params(ast_args.kwonlyargs, ast_args.kw_defaults, parameters, implicit_default=True)
66 _type_comment_re = re.compile(
74 (?<!ignore) # note: this will force the non-greedy + in <type> to match
75 # a trailing space which is why we need the silliness below
76 (?<!ignore[ ]{1})(?<!ignore[ ]{2})(?<!ignore[ ]{3})(?<!ignore[ ]{4})
77 (?<!ignore[ ]{5})(?<!ignore[ ]{6})(?<!ignore[ ]{7})(?<!ignore[ ]{8})
78 (?<!ignore[ ]{9})(?<!ignore[ ]{10})
87 re.MULTILINE|re.VERBOSE
90 def single_literal_yapf_disable():
91 """Black does not support this."""
99 xxxx_xxxx=["xxx-xxxxxx-xxxxxxxxxx"],
100 xxxxxx="xx_xxxxx", xxxxxxx="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
101 xxxxxxxxx_xxxx=True, xxxxxxxx_xxxxxxxxxx=False,
102 xxxxxx_xxxxxx=2, xxxxxx_xxxxx_xxxxxxxx=70, xxxxxx_xxxxxx_xxxxx=True,
104 xxxxxxx_xxxxxxxxxxxx={
108 "xxxx_xxxxxx": "xxxxx",
113 "xxxx_xxxxxx": "xxxxxx",
117 xxxxxxxxxx_xxxxxxxxxxx_xxxxxxx_xxxxxxxxx=5
120 # No formatting to the end of the file
128 #!/usr/bin/env python3
132 from third_party import X, Y, Z
134 from library import some_connection, some_decorator
137 from third_party import (X,
144 if True: raise RuntimeError
149 exec('new-style exec', {}, {})
151 async def coroutine(arg, exec=False):
152 'Single-line docstring. Multiline is harder to reformat.'
153 async with some_connection() as conn:
154 await conn.do_what_i_mean('SELECT bobby, tables FROM xkcd', timeout=2)
155 await asyncio.sleep(1)
161 def function_signature_stress_test(number:int,no_annotation=None,text:str='default',* ,debug:bool=False,**kwargs) -> str:
162 return text[number:-1]
164 def spaces(a=1, b=(), c=[], d={}, e=True, f=-1, g=1 if False else 2, h="", i=r""):
165 offset = attr.ib(default=attr.Factory(lambda: _r.uniform(10000, 200000)))
166 assert task._cancel_stack[: len(old_stack)] == old_stack
176 g: int = 1 if False else 2,
183 def spaces2(result=_core.Value(None)):
193 def example(session):
196 .query(models.Customer.id)\
197 .filter(models.Customer.account_id == account_id,
198 models.Customer.email == email_address)\
199 .order_by(models.Customer.id.asc())\
206 typedargslist.extend(
207 gen_annotated_params(
209 ast_args.kw_defaults,
211 implicit_default=True,
216 unnecessary_bracket()
219 _type_comment_re = re.compile(
227 (?<!ignore) # note: this will force the non-greedy + in <type> to match
228 # a trailing space which is why we need the silliness below
229 (?<!ignore[ ]{1})(?<!ignore[ ]{2})(?<!ignore[ ]{3})(?<!ignore[ ]{4})
230 (?<!ignore[ ]{5})(?<!ignore[ ]{6})(?<!ignore[ ]{7})(?<!ignore[ ]{8})
231 (?<!ignore[ ]{9})(?<!ignore[ ]{10})
240 re.MULTILINE|re.VERBOSE
245 def single_literal_yapf_disable():
246 """Black does not support this."""
247 BAZ = {(1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12)} # yapf: disable
253 xxxx_xxxx=["xxx-xxxxxx-xxxxxxxxxx"],
255 xxxxxxx="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
257 xxxxxxxx_xxxxxxxxxx=False,
259 xxxxxx_xxxxx_xxxxxxxx=70,
260 xxxxxx_xxxxxx_xxxxx=True,
262 xxxxxxx_xxxxxxxxxxxx={
266 "xxxx_xxxxxx": "xxxxx",
271 "xxxx_xxxxxx": "xxxxxx",
275 xxxxxxxxxx_xxxxxxxxxxx_xxxxxxx_xxxxxxxxx=5,
278 # No formatting to the end of the file