- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.7k
 
Open
Labels
T: bugSomething isn't workingSomething isn't working
Description
Describe the bug
I expect the wrapping to look nicer
To Reproduce
For example, take this code:
class Example:
    @overload
    @classmethod
    def create_from[TBool: (Literal[True], Literal[False])](
        cls: type[SearchConfig[Any]],
        search_config: SearchConfig[Any],
        *,
        allow_boolean: TBool,
        **overrides: Any,
    ) -> SearchConfig[TBool]: ...And run it with these arguments:
$ black t.py --target-version py313 --line-length 100and the result is:
class Example:
    @overload
    @classmethod
    def create_from[TBool: (
        Literal[True],
        Literal[False],
    )](
        cls: type[SearchConfig[Any]],
        search_config: SearchConfig[Any],
        *,
        allow_boolean: TBool,
        **overrides: Any,
    ) -> SearchConfig[TBool]: ...Expected behavior
(no change ideally?)
there's two weirdnesses
- the typevar was already pretty short so it should not have been wrapped
 - the wrapping feels wrong -- it doesn't follow black's usual parameter indentation
 
Environment
- Black's version: 25.1.0
 - OS and Python version: macos 3.13.1
 
Additional context
nope!
Metadata
Metadata
Assignees
Labels
T: bugSomething isn't workingSomething isn't working