-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatter undocumented deviation: add comma after single argument definition #7323
Comments
Interesting find. Black does add a trailing comma if the identifier doesn't fit but not when the type annotation or default value expands over multiple lines. def main(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
) -> None:
start_async(launch_network_watcher, pickle_path)
def main(
pickle_path: Argument(
"network_messages.pickle",
help="The path of the pickle file that will contain the network messages",
)
) -> None:
start_async(launch_network_watcher, pickle_path) This feels a bit inconsistent to me. We'll have to narrow down if this is intentional or not. |
I ran into this at one point and I believe I came to the conclusion that it was unintentional and that the inconsistencies were hard to understand. |
(I prefer the consistency of our formatting here, personally.) |
I find the inconsistency here confusing: def main(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
) -> None:
start_async(launch_network_watcher, pickle_path)
def main(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=1,
) -> None:
start_async(launch_network_watcher, pickle_path)
def main(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: Argument(
"network_messages.pickle",
help="The path of the pickle file that will contain the network messages",
) = 1
) -> None:
start_async(launch_network_watcher, pickle_path) I would vote to leave as-is. |
We're marking this as an intentional deviation. Can be closed once it's documented. |
Black formatting
Ruff formatting
Ruff 0.0.289 with line-length 100
The text was updated successfully, but these errors were encountered: