-
-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Reported on Matrix.
One rather small nit with signatures, when using separate signatures formatted by Black, is that the formatting varies depending on how many arguments there are and how long they and their possible types and default valus are. All these formats are possible:
compact(arg: int) -> bool
semi_compact(
first_arg: int, second_arg: int
) -> int
verbose(
first_arg: int = 1,
second_arg: int = 2,
third_arg: int = 3
) -> intI undertand why the format changes and it isn't a big problem, but it is still somewhat confusing and inconsistent if two functions in same module have different signature formats. It would be great if there was a way to force the verbose style to be used always or, perhaps better, always when there's more than one parameter. Unless Black has a such configuration option this may be too hard to implement, though, and Black isn't known for supporting much configuration.
pekkaklarck
Metadata
Metadata
Assignees
Labels
No labels