Skip to content

missing completions when type keyword is used instead of typing.Type in python3.12 #675

@vindex10

Description

@vindex10

Hi! In python3.12 new syntax was introduced for annotating class types:
https://docs.python.org/3/library/typing.html#the-type-of-class-objects

instead of using deprecated typing.Type[C] now type[C] should be used.

I just noticed that autocomplete in pylsp doesn't pick up new syntax yet.

Image

the old syntax works:

Image

I tested on the latest version of pylsp:

$ pylsp --version
pylsp v1.13.2.dev1+g89265cdb7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions