Skip to content

Based type parser #1

@KotlinIsland

Description

@KotlinIsland
class A:
    a: 1 | 2
based typing.get_annotations(A) # {"a": Union[1, 2]
# such that `1 | 2` == `Union[1, 2]`, not `3`
#  and `A & B` is `basedtyping.Intersection`

No idea how this will work with the new type alias syntax in 3.12, maybe we can raise that they should have a .value or something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions