You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lambdas used as default parameters for functions look really ugly when the function parameter is exploded (e.g. via a typehint being too long
Examples in the current Black style
classFoo:
defbar(
self,
baz: typing.Callable[
# long typevar name (and this comment) causes# declaration to be exploded
[SpecialisationT, SpecialisationT], SpecialisationT
] =lambdai, j: j-i, # ugly line split here
):
...
Desired style
classFoo:
defbar(
self,
baz: typing.Callable[
[SpecialisationT, SpecialisationT], SpecialisationT
] =lambdai, j: j-i, # no ugly line split
):
...
Additional context
The formatting issue can be sidestepped with a pair of brackets around the lambda, so not top priority, but this is uncharacteristically bad formatting
The text was updated successfully, but these errors were encountered:
Describe the style change
Lambdas used as default parameters for functions look really ugly when the function parameter is exploded (e.g. via a typehint being too long
Examples in the current Black style
Desired style
Additional context
The formatting issue can be sidestepped with a pair of brackets around the lambda, so not top priority, but this is uncharacteristically bad formatting
The text was updated successfully, but these errors were encountered: