Loading README.md +3 −0 Changes for README.md: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -324,6 +324,9 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md). * omit extra space in kwarg unpacking if it's the first argument (#46) * omit extra space in [Sphinx auto-attribute comments](http://www.sphinx-doc.org/en/stable/ext/autodoc.html#directive-autoattribute) (#68) ### 18.3a3 Loading black.py +1 −1 Changes for black.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -1183,7 +1183,7 @@ def make_comment(content: str) -> str: if content[0] == '#': content = content[1:] if content and content[0] not in {' ', '!', '#'}: if content and content[0] not in ' !:#': content = ' ' + content return '#' + content Loading tests/comments.py +20 −0 Changes for tests/comments.py: 20 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -49,6 +49,26 @@ def function(default=None): # This time two lines. class Foo: """Docstring for class Foo. Example from Sphinx docs.""" #: Doc comment for class attribute Foo.bar. #: It can have multiple lines. bar = 1 flox = 1.5 #: Doc comment for Foo.flox. One line only. baz = 2 """Docstring for class attribute Foo.baz.""" def __init__(self): #: Doc comment for instance attribute qux. self.qux = 3 self.spam = 4 """Docstring for instance attribute spam.""" @fast(really=True) async def wat(): async with X.open_async() as x: # Some more comments Loading Loading
README.md +3 −0 Changes for README.md: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -324,6 +324,9 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md). * omit extra space in kwarg unpacking if it's the first argument (#46) * omit extra space in [Sphinx auto-attribute comments](http://www.sphinx-doc.org/en/stable/ext/autodoc.html#directive-autoattribute) (#68) ### 18.3a3 Loading
black.py +1 −1 Changes for black.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -1183,7 +1183,7 @@ def make_comment(content: str) -> str: if content[0] == '#': content = content[1:] if content and content[0] not in {' ', '!', '#'}: if content and content[0] not in ' !:#': content = ' ' + content return '#' + content Loading
tests/comments.py +20 −0 Changes for tests/comments.py: 20 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -49,6 +49,26 @@ def function(default=None): # This time two lines. class Foo: """Docstring for class Foo. Example from Sphinx docs.""" #: Doc comment for class attribute Foo.bar. #: It can have multiple lines. bar = 1 flox = 1.5 #: Doc comment for Foo.flox. One line only. baz = 2 """Docstring for class attribute Foo.baz.""" def __init__(self): #: Doc comment for instance attribute qux. self.qux = 3 self.spam = 4 """Docstring for instance attribute spam.""" @fast(really=True) async def wat(): async with X.open_async() as x: # Some more comments Loading