Skip to content

Fix some pylint findings#42

Merged
hugovk merged 7 commits intopython-humanize:mainfrom
hugovk:fixes
Aug 25, 2022
Merged

Fix some pylint findings#42
hugovk merged 7 commits intopython-humanize:mainfrom
hugovk:fixes

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Jul 9, 2022

Fix some pylint findings:

  • Don't shadow ordinal function
  • More descriptive variable name: u -> unit
  • Remove unnecessary elif and else after return: less certain about some of these, but I think it reduces complexity of some quite deeply nested code

Fix tests:

  • Add missing assert to test
  • Remove redundant comparison

@hugovk hugovk added the changelog: Fixed For any bug fixes label Jul 9, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jul 9, 2022

Codecov Report

Merging #42 (d2bd73e) into main (5dc4b82) will increase coverage by 0.14%.
The diff coverage is 97.82%.

@@            Coverage Diff             @@
##             main      #42      +/-   ##
==========================================
+ Coverage   99.12%   99.27%   +0.14%     
==========================================
  Files           9        9              
  Lines         686      686              
==========================================
+ Hits          680      681       +1     
+ Misses          6        5       -1     
Flag Coverage Δ
macos-latest 97.52% <97.82%> (+0.14%) ⬆️
ubuntu-latest 97.52% <97.82%> (+0.14%) ⬆️
windows-latest 97.23% <97.82%> (+0.14%) ⬆️

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

Impacted Files Coverage Δ
src/humanize/number.py 96.89% <93.75%> (ø)
src/humanize/filesize.py 100.00% <100.00%> (ø)
src/humanize/time.py 100.00% <100.00%> (+0.46%) ⬆️
tests/test_i18n.py 100.00% <100.00%> (ø)
tests/test_time.py 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 5dc4b82...d2bd73e. Read the comment docs.

@hugovk hugovk force-pushed the fixes branch 2 times, most recently from d2bd73e to ad92865 Compare July 11, 2022 09:57
@hugovk hugovk merged commit e0a0ef0 into python-humanize:main Aug 25, 2022
@hugovk hugovk deleted the fixes branch August 25, 2022 11:22
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants