Skip to content

Add support for PEP 585 #229

Description

@sprt

Since PEP 585 implemented in Python 3.9, one can use the generics syntax even with built-in collections, not just those included in typing (e.g. list vs. typing.List).

As such, in the screenshot below, the type hint for argument c isn't highlighted properly. In list[int], both list and int should be highlighted, whereas only int is highlighted currently. The type hint for argument b is highlighted correctly (and same for a).

  • Editor name and version: VS Code 1.51.1
  • Platform: Ubuntu 16.04
  • Color scheme: Tomorrow Night (also tested with other ones but none exhibit the desired behavior)
  • MagicPython version: From the VS Code extension = 1.1.0
  • A screenshot:
    Screenshot from 2020-11-16 15-29-09
  • 5-10 lines of surrounding code: None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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