You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Repository navigation
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
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.
@overloaddefpow(x: int, y: int) ->Any: ... # The return type can be int or float, depending on y.@overloaddefpow(x: int, y: int, z: int) ->Any: ...
@overloaddefpow(x: float, y: float) ->float: ...
@overloaddefpow(x: float, y: float, z: float) ->float: ...
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 thanpow(x, y, z = None)and specialization just returns type ofx. Typeshed stub is much more detailed, but extensively uses typing module so understanding of typing has to be improved as well.