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 output of --list-locales to not use bytes reprs #845

Merged
merged 1 commit into from Apr 8, 2022

Conversation

morganwahl
Copy link
Contributor

This adds a unit test for the --list-locales argument, and updates its implementation to not output bytes reprs.

In other words, goes from this:

...
b'fr_CH           French (Switzerland)'
b'fr_CI           French (C\xc3\xb4te d\xe2\x80\x99Ivoire)'
b'fr_CM           French (Cameroon)'
...

to this

...
fr_CH           French (Switzerland)
fr_CI           French (Côte d’Ivoire)
fr_CM           French (Cameroon)
...

@akx akx self-requested a review February 26, 2022 21:50
@codecov
Copy link

codecov bot commented Feb 26, 2022

Codecov Report

Merging #845 (a805eb7) into master (6be6b1f) will increase coverage by 0.21%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #845      +/-   ##
==========================================
+ Coverage   91.09%   91.30%   +0.21%     
==========================================
  Files          23       23              
  Lines        4156     4154       -2     
==========================================
+ Hits         3786     3793       +7     
+ Misses        370      361       -9     
Impacted Files Coverage Δ
babel/messages/frontend.py 87.79% <100.00%> (+1.69%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Member

@akx akx 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 contribution! I think we can simplify things a bunch :)

babel/messages/frontend.py Outdated Show resolved Hide resolved
tests/messages/test_frontend.py Outdated Show resolved Hide resolved
tests/messages/test_frontend.py Outdated Show resolved Hide resolved
Co-authored-by: Aarni Koskela <akx@iki.fi>
@akx akx modified the milestones: Babel 3, Babel 2.10 Apr 8, 2022
@akx akx self-requested a review April 8, 2022 13:07
Copy link
Member

@akx akx left a comment

Choose a reason for hiding this comment

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

I folded in my review comments. Thank you for the contribution!

@akx akx merged commit 8ef344d into python-babel:master Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants