X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/8c22d232b56104376a12d1e68eaf216d04979830..9bd4134f3138448eb92af7031d994b2cec7d08ad:/src/black/parsing.py diff --git a/src/black/parsing.py b/src/black/parsing.py index 13fa67e..6b63368 100644 --- a/src/black/parsing.py +++ b/src/black/parsing.py @@ -206,7 +206,7 @@ def stringify_ast(node: Union[ast.AST, ast3.AST], depth: int = 0) -> Iterator[st break try: - value = getattr(node, field) + value: object = getattr(node, field) except AttributeError: continue @@ -237,6 +237,7 @@ def stringify_ast(node: Union[ast.AST, ast3.AST], depth: int = 0) -> Iterator[st yield from stringify_ast(value, depth + 2) else: + normalized: object # Constant strings may be indented across newlines, if they are # docstrings; fold spaces after newlines when comparing. Similarly, # trailing and leading space may be removed.