-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
F: linebreakHow should we split up lines?How should we split up lines?T: bugSomething isn't workingSomething isn't working
Description
Describe the style change
For some reason, black weirdly wraps a type hint only if it is after a comment.
Examples in the current Black style
def get_requires_for_build_sdist(
config_settings: dict[str, str | list[str]] | None = None
) -> list[str]:
return ["pathspec", "pyproject_metadata"]
def get_requires_for_build_sdist(
# pylint: disable-next=unused-argument
config_settings: dict[str, str | list[str]]
| None = None
) -> list[str]:
return ["pathspec", "pyproject_metadata"]Desired style
def get_requires_for_build_sdist(
config_settings: dict[str, str | list[str]] | None = None
) -> list[str]:
return ["pathspec", "pyproject_metadata"]
def get_requires_for_build_sdist(
# pylint: disable-next=unused-argument
config_settings: dict[str, str | list[str]] | None = None
) -> list[str]:
return ["pathspec", "pyproject_metadata"]Additional context
Tested with both regular black and --preview, and with target version.
felix-hilden
Metadata
Metadata
Assignees
Labels
F: linebreakHow should we split up lines?How should we split up lines?T: bugSomething isn't workingSomething isn't working