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

Fix DeprecationWarning: Plural value must be an integer, got float #147

Merged
merged 4 commits into from
Oct 19, 2023

Conversation

dansarpong
Copy link
Contributor

Fixes #106

Changes proposed in this pull request:

  • Ensures plural value gotten is an integer

@hugovk hugovk added the changelog: Fixed For any bug fixes label Oct 3, 2023
@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (e7c75ef) 99.19% compared to head (fe227a6) 99.19%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #147   +/-   ##
=======================================
  Coverage   99.19%   99.19%           
=======================================
  Files           9        9           
  Lines         746      747    +1     
=======================================
+ Hits          740      741    +1     
  Misses          6        6           
Flag Coverage Δ
macos-latest 97.59% <100.00%> (+<0.01%) ⬆️
ubuntu-latest 97.59% <100.00%> (+<0.01%) ⬆️
windows-latest 96.11% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/humanize/time.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! A couple of suggestions.

src/humanize/i18n.py Outdated Show resolved Hide resolved
src/humanize/time.py Outdated Show resolved Hide resolved
dansarpong and others added 4 commits October 19, 2023 09:19
Fixed an error where a float value given in _ngettext generated errors
when expecting integer value
Fixed an error where there was a DeprecationWarning upon using
a float, when an integer was expected
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

@hugovk hugovk changed the title Fix plural float error Fix DeprecationWarning: Plural value must be an integer, got float Oct 19, 2023
@hugovk hugovk merged commit c62340c into python-humanize:main Oct 19, 2023
27 checks passed
@hugovk hugovk added the hacktoberfest-accepted To credit accepted Hacktoberfest PRs label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: Fixed For any bug fixes hacktoberfest-accepted To credit accepted Hacktoberfest PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DeprecationWarning: Plural value must be an integer, got float
2 participants