-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Fix/brazilian isbn locale #2227
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
base: master
Are you sure you want to change the base?
Conversation
- Added new DOI provider with correct implementation - Removed incorrect DOI implementation from Spanish locale - Added tests for DOI provider - Updated CHANGELOG.md
- Added Brazilian ISBN provider with group code 85
- Ensured Faker('pt_BR') generating ISBNs with Brazilian group prefix
- Added tests to verify Brazilian ISBN generation
- Fixed the issue where pt_BR locale ignored locale and generated international ISBNs
|
Thank you in advance for review ❤️ |
faker/providers/doi/__init__.py
Outdated
| Format: 10.{4-9 digits}/{alphanumeric string} | ||
| Eg: 10.1000/xyz123 | ||
| fix/brazilian-isbn-locale |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you remove those lines?
- Updated documentation to clarify new format (AA-999-AA) since 2009 - Added specific methods for new and old format license plates - Added comprehensive tests for both formats - New format is properly prioritized
|
The PR contains changes that have nothing to do with the ISBN provider (eg I see some changes to the automotive one). Could you please clean up your branch to contain only changes to |
What does this change
Fixed Brazilian ISBN locale support (issue #2216)
What was wrong
When user was using
Faker('pt_BR'), theisbn10()andisbn13()methods were generating ISBNs with group codes like0or1(which are the US/UK regions) instead of the Brazilian group code85, absolutely ignoring the configured locale.How this fixes it
faker/providers/isbn/pt_BR/__init__.py) with group code85.Faker('pt_BR')generating ISBN's with Brazilian group prefix.Fixes #...
faker/providers/isbn/pt_BR/__init__.py-> Brazilian ISBN provider.tests/providers/test_isbn.py-> Added detailed test for Brazilian ISBN generation.Tests:
All tests passed, new tests verified, followed black & flake & mypy.
0-9720769-8-0(US/UK)85-3225-314-8(Brazilian 85)Checklist
make lint