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

Improve default locale path discovering. #146

Merged
merged 5 commits into from
Aug 10, 2020
Merged

Conversation

mondeja
Copy link
Contributor

@mondeja mondeja commented Jul 31, 2020

Changes proposed in this pull request:

  • Default locale path only is computed when humanize.i18n.activate function is called.
  • Handle __file__ is None and __file__ not defined cases.
  • Add tests cases increasing code coverage.

@codecov-commenter
Copy link

codecov-commenter commented Jul 31, 2020

Codecov Report

Merging #146 into master will increase coverage by 0.57%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #146      +/-   ##
===========================================
+ Coverage   99.42%   100.00%   +0.57%     
===========================================
  Files           9         9              
  Lines         524       554      +30     
===========================================
+ Hits          521       554      +33     
+ Misses          3         0       -3     
Flag Coverage Δ
#GHA_Ubuntu 100.00% <100.00%> (+0.57%) ⬆️
#GHA_Windows 100.00% <100.00%> (+0.57%) ⬆️
#GHA_macOS 100.00% <100.00%> (+0.57%) ⬆️

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

Impacted Files Coverage Δ
src/humanize/i18n.py 100.00% <100.00%> (+7.50%) ⬆️
tests/test_i18n.py 100.00% <100.00%> (ø)
src/humanize/time.py 100.00% <0.00%> (ø)
src/humanize/number.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 15ecb0a...7de59b6. Read the comment docs.

@mondeja mondeja marked this pull request as draft July 31, 2020 13:55
@mondeja mondeja marked this pull request as ready for review July 31, 2020 14:03
Copy link
Collaborator

@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!

Just a few minor suggestions :)

src/humanize/i18n.py Outdated Show resolved Hide resolved
src/humanize/i18n.py Outdated Show resolved Hide resolved
tests/test_i18n.py Outdated Show resolved Hide resolved
tests/test_i18n.py Outdated Show resolved Hide resolved
@hugovk hugovk added the changelog: Changed For changes in existing functionality label Aug 2, 2020
@mondeja
Copy link
Contributor Author

mondeja commented Aug 6, 2020

All resolved, seems that coverage upload is failing...

@hugovk
Copy link
Collaborator

hugovk commented Aug 6, 2020

Thanks! Yeah, the coverage upload has been a bit flaky of late, nothing to worry about here. I've restarted the CI (but it might fail again 🙃).

src/humanize/i18n.py Outdated Show resolved Hide resolved
src/humanize/i18n.py Outdated Show resolved Hide resolved
tests/test_i18n.py Outdated Show resolved Hide resolved
tests/test_i18n.py Outdated Show resolved Hide resolved
tests/test_i18n.py Outdated Show resolved Hide resolved
@hugovk hugovk merged commit cca5a74 into jmoiron:master Aug 10, 2020
@hugovk
Copy link
Collaborator

hugovk commented Aug 10, 2020

Thank you!

@mondeja mondeja deleted the i18n-dlp branch May 4, 2021 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: Changed For changes in existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants