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 format_time pluralization #1990

Merged
merged 1 commit into from
Dec 25, 2024
Merged

Conversation

hemberger
Copy link
Member

The pluralise function was not returning the correct pluralization for identically 1 float values. Since ceil/floor return a float, this was causing format_time to return strings like "1 minutes" instead of "1 minute".

This is fixed by casting the value to a float in the comparison to 1 in pluralise.

The `pluralise` function was not returning the correct pluralization for
identically 1 float values. Since ceil/floor return a float, this was
causing `format_time` to return strings like "1 minutes" instead of
"1 minute".

This is fixed by casting the value to a float in the comparison to 1 in
`pluralise`.
Copy link

codecov bot commented Dec 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 31.74%. Comparing base (d254e9d) to head (44f2467).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1990      +/-   ##
============================================
+ Coverage     31.45%   31.74%   +0.28%     
  Complexity     4205     4205              
============================================
  Files           125      125              
  Lines         12815    12815              
============================================
+ Hits           4031     4068      +37     
+ Misses         8784     8747      -37     

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

@hemberger hemberger merged commit f3cdb75 into smrealms:main Dec 25, 2024
9 checks passed
@hemberger hemberger deleted the fix-pluralise branch December 25, 2024 08:44
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.

1 participant