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

ref(metrics): Improve type hints for set metrics #3048

Merged
merged 2 commits into from
May 14, 2024
Merged

Conversation

elramen
Copy link
Contributor

@elramen elramen commented May 6, 2024

Remove MetricValue from the set metric's value type hint. MetricValue is a union that includes floatwhich is correct based on how other parts of the code uses MetricValue. However, as floats are intentionally floored for set metrics, the current type hint might be confusing for a user as it looks like floats would work as unique values in a set.

Fixes GH-3038

Copy link
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

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

Looks good! But, before merging, please rename the commit to ref(metrics) ...

@elramen elramen changed the title ref(typing): Improve type hints for set metrics ref(metrics): Improve type hints for set metrics May 14, 2024
@elramen elramen merged commit cc11c0f into master May 14, 2024
111 checks passed
@elramen elramen deleted the metric-type-hints branch May 14, 2024 15:59
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.

Misleading set metric value type hint
2 participants