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, \
12 if True: raise RuntimeError
18 async def coroutine(arg):
19 "Single-line docstring. Multiline is harder to reformat."
20 async with some_connection() as conn:
21 await conn.do_what_i_mean('SELECT bobby, tables FROM xkcd', timeout=2)
22 await asyncio.sleep(1)
28 def function_signature_stress_test(number:int,no_annotation=None,text:str="default",* ,debug:bool=False,**kwargs) -> str:
29 return text[number:-1]
30 def spaces(a=1, b=(), c=[], d={}, e=True, f=-1, g=1 if False else 2, h="", i=r''):
31 offset = attr.ib(default=attr.Factory( lambda: _r.uniform(10000, 200000)))
32 assert task._cancel_stack[:len(old_stack)] == old_stack
33 def spaces2(result= _core.Value(None)):
39 gen_annotated_params(ast_args.kwonlyargs, ast_args.kw_defaults, parameters, implicit_default=True)
41 _type_comment_re = re.compile(
49 (?<!ignore) # note: this will force the non-greedy + in <type> to match
50 # a trailing space which is why we need the silliness below
51 (?<!ignore[ ]{1})(?<!ignore[ ]{2})(?<!ignore[ ]{3})(?<!ignore[ ]{4})
52 (?<!ignore[ ]{5})(?<!ignore[ ]{6})(?<!ignore[ ]{7})(?<!ignore[ ]{8})
53 (?<!ignore[ ]{9})(?<!ignore[ ]{10})
60 """, re.MULTILINE | re.VERBOSE
66 #!/usr/bin/env python3
70 from third_party import X, Y, Z
72 from library import some_connection, some_decorator
91 async def coroutine(arg):
92 "Single-line docstring. Multiline is harder to reformat."
93 async with some_connection() as conn:
94 await conn.do_what_i_mean('SELECT bobby, tables FROM xkcd', timeout=2)
95 await asyncio.sleep(1)
99 @some_decorator(with_args=True, many_args=[1, 2, 3])
100 def function_signature_stress_test(
103 text: str = "default",
108 return text[number:-1]
111 def spaces(a=1, b=(), c=[], d={}, e=True, f=-1, g=1 if False else 2, h="", i=r''):
112 offset = attr.ib(default=attr.Factory(lambda: _r.uniform(10000, 200000)))
113 assert task._cancel_stack[:len(old_stack)] == old_stack
116 def spaces2(result=_core.Value(None)):
122 typedargslist.extend(
123 gen_annotated_params(
125 ast_args.kw_defaults,
127 implicit_default=True,
130 _type_comment_re = re.compile(
138 (?<!ignore) # note: this will force the non-greedy + in <type> to match
139 # a trailing space which is why we need the silliness below
140 (?<!ignore[ ]{1})(?<!ignore[ ]{2})(?<!ignore[ ]{3})(?<!ignore[ ]{4})
141 (?<!ignore[ ]{5})(?<!ignore[ ]{6})(?<!ignore[ ]{7})(?<!ignore[ ]{8})
142 (?<!ignore[ ]{9})(?<!ignore[ ]{10})
150 re.MULTILINE | re.VERBOSE,