Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Use typeshed for builtins rather than the scraper #533

Description

This will allow better understanding of builtins since scraper does not always generate correct result and for return type we have to do specialization. Ex, in 3.7 scraper generates pow(x, y, z) rather than pow(x, y, z = None) and specialization just returns type of x. Typeshed stub is much more detailed, but extensively uses typing module so understanding of typing has to be improved as well.

@overload
def pow(x: int, y: int) -> Any: ...  # The return type can be int or float, depending on y.
@overload
def pow(x: int, y: int, z: int) -> Any: ...
@overload
def pow(x: float, y: float) -> float: ...
@overload
def pow(x: float, y: float, z: float) -> float: ...

Activity

  1. MikhailArkhipov commented on Feb 5, 2019

    @MikhailArkhipov
    Author

    Needs #569

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

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