Skip to content

[3.8] int and fractions.Fraction report as having no as_integer_ratio member erroneously #3730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Starwort opened this issue Feb 6, 2020 · 3 comments

Comments

@Starwort
Copy link

Starwort commented Feb 6, 2020

I would fix this if I understood the layout - but there is no builtins/fractions typing information in the /3/ folder that I can tell
Both (1).as_integer_ratio() and fractions.Fraction().as_integer_ratio() work in the console but throw errors with mypy

@srittau
Copy link
Collaborator

srittau commented Feb 6, 2020

as_integer_ratio() was added in #3337 and your examples work for me with the latest mypy (0.761).

@JelleZijlstra
Copy link
Member

As for your confusion about directory layout, the builtins module is in stdlib/2and3/ because we use the same file for Python 2 and 3.

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Feb 6, 2020

Directory layout is documented in https://github.com/python/typeshed/blob/master/CONTRIBUTING.md#stub-versioning, let us know if that could be improved!

@srittau srittau closed this as completed Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants