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 # Test for https://github.com/psf/black/issues/246.
4 # This comment should be split from the statement above by two lines.
10 # This multiline comments section
11 # should be split from the statement
18 # This comment should be split from the statement above by two lines.
19 async def async_function():
24 # This comment should be split from the statement above by two lines.
30 # This should be stick to the statement above
32 # This should be split from the above by two lines
33 class MyClassWithComplexLeadingComments:
37 class ClassWithDocstring:
39 # Leading comment after a class with just a docstring
40 class MyClassAfterAnotherClassWithDocstring:
49 @deco2(with_args=True)
61 @deco2(with_args=True)
63 # leading 3 that already has an empty line
66 def decorated_with_split_leading_comments():
74 @deco2(with_args=True)
78 # leading 4 that already has an empty line
79 def decorated_with_split_leading_comments():
85 # Leading comment before inline function
88 # Another leading comment
92 # More leading comments
93 def inline_after_else():
98 # Leading comment before "top-level inline" function
99 def top_level_quote_inline():
101 # Another leading comment
102 def another_top_level_quote_inline_inline():
105 # More leading comments
106 def top_level_quote_inline_after_else():
111 # First method has no empty lines between bare class def.
113 def first_method(self):
120 # Test for https://github.com/psf/black/issues/246.
125 # This comment should be split from the statement above by two lines.
133 # This multiline comments section
134 # should be split from the statement
135 # above by two lines.
143 # This comment should be split from the statement above by two lines.
144 async def async_function():
151 # This comment should be split from the statement above by two lines.
157 # This should be stick to the statement above
160 # This should be split from the above by two lines
161 class MyClassWithComplexLeadingComments:
165 class ClassWithDocstring:
169 # Leading comment after a class with just a docstring
170 class MyClassAfterAnotherClassWithDocstring:
181 @deco2(with_args=True)
195 @deco2(with_args=True)
197 # leading 3 that already has an empty line
200 def decorated_with_split_leading_comments():
210 @deco2(with_args=True)
214 # leading 4 that already has an empty line
215 def decorated_with_split_leading_comments():
221 # Leading comment before inline function
225 # Another leading comment
226 def another_inline():
230 # More leading comments
231 def inline_after_else():
236 # Leading comment before "top-level inline" function
237 def top_level_quote_inline():
240 # Another leading comment
241 def another_top_level_quote_inline_inline():
245 # More leading comments
246 def top_level_quote_inline_after_else():
251 # First method has no empty lines between bare class def.
253 def first_method(self):