Loading README.md +5 −0 Changes for README.md: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -272,6 +272,11 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md). * if top level functions were separated by a comment, don't put four empty lines after the upper function * fixed unstable formatting of newlines with imports * fixed unintentional folding of post scriptum standalone comments into last statement if it was a simple statement (#18, #28) * fixed missing space in numpy-style array indexing (#33) * fixed spurious space after star-based unary expressions (#31) Loading black.py +1 −1 Changes for black.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -1115,7 +1115,7 @@ def generate_comments(leaf: Leaf) -> Iterator[Leaf]: if content and (content[0] not in {' ', '!', '#'}): content = ' ' + content is_standalone_comment = ( '\n' in before_comment or '\n' in content or leaf.type == token.DEDENT '\n' in before_comment or '\n' in content or leaf.type == token.ENDMARKER ) if not is_standalone_comment: # simple trailing comment Loading tests/expression.py +6 −0 Changes for tests/expression.py: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -124,6 +124,9 @@ async def f(): signal.getsignal(signal.SIGINT) != signal.default_int_handler ): return True last_call() # standalone comment at ENDMARKER # output Loading Loading @@ -275,3 +278,6 @@ async def f(): or signal.getsignal(signal.SIGINT) != signal.default_int_handler ): return True last_call() # standalone comment at ENDMARKER Loading
README.md +5 −0 Changes for README.md: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -272,6 +272,11 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md). * if top level functions were separated by a comment, don't put four empty lines after the upper function * fixed unstable formatting of newlines with imports * fixed unintentional folding of post scriptum standalone comments into last statement if it was a simple statement (#18, #28) * fixed missing space in numpy-style array indexing (#33) * fixed spurious space after star-based unary expressions (#31) Loading
black.py +1 −1 Changes for black.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -1115,7 +1115,7 @@ def generate_comments(leaf: Leaf) -> Iterator[Leaf]: if content and (content[0] not in {' ', '!', '#'}): content = ' ' + content is_standalone_comment = ( '\n' in before_comment or '\n' in content or leaf.type == token.DEDENT '\n' in before_comment or '\n' in content or leaf.type == token.ENDMARKER ) if not is_standalone_comment: # simple trailing comment Loading
tests/expression.py +6 −0 Changes for tests/expression.py: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -124,6 +124,9 @@ async def f(): signal.getsignal(signal.SIGINT) != signal.default_int_handler ): return True last_call() # standalone comment at ENDMARKER # output Loading Loading @@ -275,3 +278,6 @@ async def f(): or signal.getsignal(signal.SIGINT) != signal.default_int_handler ): return True last_call() # standalone comment at ENDMARKER