-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
formatterRelated to the formatterRelated to the formatterpreviewRelated to preview mode featuresRelated to preview mode features
Milestone
Description
Implement Black's parenthesize_long_type_hints as a preview style in Ruff.
def foo(
i: int,
x: Loooooooooooooooooooooooong
| Looooooooooooooooong
| Looooooooooooooooooooong
| Looooooong,
*,
s: str,
) -> None:
pass
# Formats now to
def foo(
i: int,
x: (
Loooooooooooooooooooooooong
| Looooooooooooooooong
| Looooooooooooooooooooong
| Looooooong
),
*,
s: str,
) -> None:
passThis seems to be similar to what Ruff used to have but we reverted in #8233. We should investigate why Black isn't breaking the list on the left for
tags: List[str] = [], # noqa: B006 - ignored by automatic migration, but should be fixedWhich people found ugly. Maybe it's because of #6975?
Metadata
Metadata
Assignees
Labels
formatterRelated to the formatterRelated to the formatterpreviewRelated to preview mode featuresRelated to preview mode features