Skip to content

align type and default value at : or = in hover panel #3239

Description

@asukaminato0721

Describe the Bug

now for some very huge function, it's like

(function) mapped_column: def mapped_column[_T](
    __name_pos: SchemaEventTarget | TypeEngine[Any] | str | type[TypeEngine[Any]] | None = None,
    __type_pos: SchemaEventTarget | TypeEngine[Any] | type[TypeEngine[Any]] | None = None,
    *args: SchemaEventTarget,
    *,
    init: _NoArg | bool = _NoArg.NO_ARG,
    repr: _NoArg | bool = _NoArg.NO_ARG,
    default: Any | None = _NoArg.NO_ARG,
    default_factory: (() -> _T) | _NoArg = _NoArg.NO_ARG,
    compare: _NoArg | bool = _NoArg.NO_ARG,
    kw_only: _NoArg | bool = _NoArg.NO_ARG,
    hash: _NoArg | bool | None = _NoArg.NO_ARG,

I hope it can be like

(function) mapped_column: def mapped_column[_T](
    __name_pos: SchemaEventTarget | TypeEngine[Any] | str | type[TypeEngine[Any]] | None = None,
    __type_pos: SchemaEventTarget | TypeEngine[Any] | type[TypeEngine[Any]] | None       = None,
    *args     : SchemaEventTarget,
    *,
    init                 : _NoArg | bool = _NoArg.NO_ARG,
    repr                 : _NoArg | bool = _NoArg.NO_ARG,
    default                 : Any | None = _NoArg.NO_ARG,
    default_factory: (() -> _T) | _NoArg = _NoArg.NO_ARG,
    compare              : _NoArg | bool = _NoArg.NO_ARG,
    kw_only              : _NoArg | bool = _NoArg.NO_ARG,
    hash          : _NoArg | bool | None = _NoArg.NO_ARG,
...

or even align at :.

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

No response

Metadata

Metadata

Labels

language-serverIssues specific to our IDE integration rather than type checking
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions