Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Jul 9, 2023
1 parent 2fee938 commit 68afae7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/black/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ def stringify_ast(node: ast.AST, depth: int = 0) -> Iterator[str]:
# trailing and leading space may be removed.
normalized = _normalize("\n", value)
elif field == "type_comment" and isinstance(value, str):
# Trailing spaces in type comments are removed.
normalized = value.rstrip(" ")
# Trailing whitespace in type comments is removed.
normalized = value.rstrip()
else:
normalized = value
yield f"{' ' * (depth+2)}{normalized!r}, # {value.__class__.__name__}"
Expand Down

0 comments on commit 68afae7

Please sign in to comment.