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: AP style for 0 is 'zero' #121

Merged
merged 3 commits into from
Mar 9, 2020
Merged

Fix: AP style for 0 is 'zero' #121

merged 3 commits into from
Mar 9, 2020

Conversation

hugovk
Copy link
Collaborator

@hugovk hugovk commented Mar 5, 2020

Fixes #72.

Changes proposed in this pull request:

Before

>>> import humanize
>>> humanize.apnumber(0)
'0'
>>> humanize.apnumber(1)
'one'
>>> humanize.apnumber(2)
'two'
>>>

After

>>> import humanize
>>> humanize.apnumber(0)
'zero'
>>> humanize.apnumber(1)
'one'
>>> humanize.apnumber(2)
'two'
>>>

@hugovk hugovk added bug Something isn't working changelog: Fixed For any bug fixes labels Mar 5, 2020
@codecov-io
Copy link

Codecov Report

Merging #121 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #121   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9      9           
  Lines         410    410           
=====================================
  Hits          410    410
Flag Coverage Δ
#GHA_Ubuntu 100% <100%> (ø) ⬆️
#GHA_Windows ?
#GHA_macOS ?
Impacted Files Coverage Δ
tests/test_number.py 100% <ø> (ø) ⬆️
src/humanize/number.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaca29f...3c13dc0. Read the comment docs.

@tmc
Copy link

tmc commented Mar 5, 2020

Codecov Report

Merging #121 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #121   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          410       410           
=========================================
  Hits           410       410           
Flag Coverage Δ
#GHA_Ubuntu 100.00% <100.00%> (ø)
#GHA_Windows ?
#GHA_macOS 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaca29f...3c13dc0. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #121 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #121   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9      9           
  Lines         410    410           
=====================================
  Hits          410    410
Flag Coverage Δ
#GHA_Ubuntu 100% <100%> (ø) ⬆️
#GHA_Windows ?
#GHA_macOS 100% <100%> (ø) ⬆️
Impacted Files Coverage Δ
tests/test_number.py 100% <ø> (ø) ⬆️
src/humanize/number.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaca29f...3c13dc0. Read the comment docs.

@tmc
Copy link

tmc commented Mar 5, 2020

Codecov Report

Merging #121 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #121   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          410       410           
=========================================
  Hits           410       410           
Flag Coverage Δ
#GHA_Ubuntu 100.00% <100.00%> (ø)
#GHA_Windows 99.02% <100.00%> (-0.98%) ⬇️
#GHA_macOS 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaca29f...1980b90. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Mar 5, 2020

Codecov Report

Merging #121 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #121   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9      9           
  Lines         410    410           
=====================================
  Hits          410    410
Flag Coverage Δ
#GHA_Ubuntu 100% <100%> (ø) ⬆️
#GHA_Windows 100% <100%> (ø) ⬆️
#GHA_macOS 100% <100%> (ø) ⬆️
Impacted Files Coverage Δ
tests/test_number.py 100% <ø> (ø) ⬆️
src/humanize/number.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaca29f...a2a8d83. Read the comment docs.

@tmc
Copy link

tmc commented Mar 5, 2020

Codecov Report

Merging #121 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #121   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          410       393   -17     
=========================================
- Hits           410       393   -17     
Flag Coverage Δ
#GHA_Ubuntu 100.00% <100.00%> (ø)
#GHA_Windows ?
#GHA_macOS ?
Impacted Files Coverage Δ
tests/test_time.py 100.00% <0.00%> (ø)
tests/test_number.py 100.00% <0.00%> (ø)
tests/test_filesize.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaca29f...a2a8d83. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #121 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #121   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9      9           
  Lines         410    410           
=====================================
  Hits          410    410
Flag Coverage Δ
#GHA_Ubuntu 100% <100%> (ø) ⬆️
#GHA_Windows ?
#GHA_macOS 100% <100%> (ø) ⬆️
Impacted Files Coverage Δ
tests/test_number.py 100% <ø> (ø) ⬆️
src/humanize/number.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaca29f...a2a8d83. Read the comment docs.

@tmc
Copy link

tmc commented Mar 5, 2020

Codecov Report

Merging #121 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #121   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          410       410           
=========================================
  Hits           410       410           
Flag Coverage Δ
#GHA_Ubuntu 100.00% <100.00%> (ø)
#GHA_Windows 100.00% <100.00%> (ø)
#GHA_macOS 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaca29f...a2a8d83. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #121 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #121   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9      9           
  Lines         410    410           
=====================================
  Hits          410    410
Flag Coverage Δ
#GHA_Ubuntu 100% <100%> (ø) ⬆️
#GHA_Windows 100% <100%> (ø) ⬆️
#GHA_macOS 100% <100%> (ø) ⬆️
Impacted Files Coverage Δ
tests/test_number.py 100% <ø> (ø) ⬆️
src/humanize/number.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaca29f...a2a8d83. Read the comment docs.

@tmc
Copy link

tmc commented Mar 5, 2020

Codecov Report

Merging #121 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #121   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          410       410           
=========================================
  Hits           410       410           
Flag Coverage Δ
#GHA_Ubuntu 100.00% <100.00%> (ø)
#GHA_Windows 100.00% <100.00%> (ø)
#GHA_macOS 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaca29f...a2a8d83. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #121 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #121   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9      9           
  Lines         410    410           
=====================================
  Hits          410    410
Flag Coverage Δ
#GHA_Ubuntu 100% <100%> (ø) ⬆️
#GHA_Windows 100% <100%> (ø) ⬆️
#GHA_macOS 100% <100%> (ø) ⬆️
Impacted Files Coverage Δ
tests/test_number.py 100% <ø> (ø) ⬆️
src/humanize/number.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaca29f...a2a8d83. Read the comment docs.

@tmc
Copy link

tmc commented Mar 5, 2020

Codecov Report

Merging #121 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #121   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          410       410           
=========================================
  Hits           410       410           
Flag Coverage Δ
#GHA_Ubuntu 100.00% <100.00%> (ø)
#GHA_Windows 100.00% <100.00%> (ø)
#GHA_macOS 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaca29f...a2a8d83. Read the comment docs.

@hugovk hugovk merged commit 1f43d30 into jmoiron:master Mar 9, 2020
@hugovk hugovk deleted the 72-fix-apnumber-zero branch March 9, 2020 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working changelog: Fixed For any bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

humanize.apnumber(0) should return zero
3 participants