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

Added LanguageAlpha2 and LanguageName types #153

Merged
merged 2 commits into from
Mar 4, 2024

Conversation

odelmarcelle
Copy link
Contributor

Hello,

I was a bit disappointed that #141 did not implement alpha-2 languages codes, so here's my take at the implementation. Unlike #141, I tried to follow as closely as possible the existing implementation in country.py.

I thought that naming the types following convention in country.py was also much clearer than the obscure segmentation of the ISO 639 standards. Hence, I created two new types: LanguageAlpha2 and LanguageName and I would suggest refactoring ISO639_3 and ISO639_5 into LanguageAlpha3.

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e186814) to head (b735056).
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main      #153    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           11        13     +2     
  Lines          685       817   +132     
  Branches       169       209    +40     
==========================================
+ Hits           685       817   +132     

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

Copy link
Collaborator

@yezz123 yezz123 left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏻

Thank you @odelmarcelle

@yezz123 yezz123 merged commit f254b34 into pydantic:main Mar 4, 2024
20 checks passed
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.

None yet

2 participants