Skip to content

Add support for Python's cast function type hint #6761

@riknoll

Description

@riknoll

Python has a nifty cast function for type hinting expressions:

foo = cast(str, my_function())

this function does nothing, it just lets you assert the type of the second argument to be whatever is passed in as the first.

supporting this would make it much easier to paper over some of our type inference's deficiencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions