Skip to content

feature: Please support new 3.12 Generic syntax #303

Open
@hongquan

Description

@hongquan

Did you check the tree-sitter docs?

Is your feature request related to a problem? Please describe.

Since v3.12, Python supports new Generic syntax:

from collections.abc import Mapping

class MyDict[T](Mapping[str, T]):
    ...

comparing to older syntax:

from collections.abc import Mapping
from typing import TypeVar, Generic

T = TypeVar('T')

class MyDict(Mapping[str, Generic[T]]):
    ...

Please support newer syntax.

Describe the solution you'd like

No

Describe alternatives you've considered

No

Additional context

No

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions