Skip to content
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

Simplify type annotations for number types #781

Merged
merged 1 commit into from Mar 9, 2022

Conversation

zhanpon
Copy link
Contributor

@zhanpon zhanpon commented Mar 9, 2022

@csmarchbanks Thanks for maintaining the project! A small patch to improve the readability of type annotations:

int values are acceptable to float variables:
https://www.python.org/dev/peps/pep-0484/#the-numeric-tower

Signed-off-by: Yiyang Zhan pon.zhan@gmail.com

int values are acceptable to float variables:
https://www.python.org/dev/peps/pep-0484/#the-numeric-tower

Signed-off-by: Yiyang Zhan <pon.zhan@gmail.com>
Copy link
Member

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I had originally put the Union in to make it clear that we can actually treat int and float differently, but I agree, this is much simpler.

@csmarchbanks csmarchbanks merged commit 789b24a into prometheus:master Mar 9, 2022
@zhanpon zhanpon deleted the simplify-number-types branch March 9, 2022 21:18
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

Successfully merging this pull request may close these issues.

None yet

2 participants