Skip to content

Move code from decimal.pyi to _decimal.pyi #7640

New issue

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

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

Already on GitHub? # to your account

Merged
merged 5 commits into from
Apr 16, 2022

Conversation

AlexWaygood
Copy link
Member

The stub currently does from decimal import * in _decimal.pyi, but the opposite happens at runtime.

@srittau
Copy link
Collaborator

srittau commented Apr 16, 2022

Please see the comment in _pydecimal.pyi. Both use the same stubs.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@AlexWaygood
Copy link
Member Author

Please see the comment in _pydecimal.pyi. Both use the same stubs.

Sure. Should we change the import in _pydecimal.pyi to import from _decimal instead of _decimal, or do you think this is just not worth doing? :)

At the moment I feel like we have two lies, one in _pydecimal and one in decimal. I don't mind the one in _pydecimal, as it avoids code duplication, but I'm not sure the one in decimal is really necessary.

@AlexWaygood AlexWaygood marked this pull request as ready for review April 16, 2022 15:43
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@AlexWaygood AlexWaygood requested a review from srittau April 16, 2022 15:49
@AlexWaygood AlexWaygood merged commit 2e98c82 into python:master Apr 16, 2022
@AlexWaygood AlexWaygood deleted the decimal-cleanup branch April 16, 2022 16:01
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants