Repository navigation
Add automotive provider for en_IN locale - #2480
Open
ShriyansBharuka wants to merge 1 commit into
Open
ShriyansBharuka wants to merge 1 commit into
ShriyansBharuka wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change
Adds the
automotiveprovider for theen_IN(English - India) locale, providing realistic and compliant vehicle registration plate generation for India.What was wrong
The
en_INlocale lacked anautomotiveprovider. CallingFaker('en_IN').license_plate()fell back to the default US format (e.g.912 AFE), which is completely inaccurate for Indian datasets.How this fixes it
Implements
faker.providers.automotive.en_IN.Provideraccording to the standards established by the Ministry of Road Transport and Highways (MoRTH):MH,DL,KA,TN,UP,GJ,WB, etc.).01–99).0001–9999).MH 12 AB 1234,DL 01 C 4521,KA 05 MN 9876.YY BH #### XX(with lettersIandOexcluded as per MoRTH regulations).22 BH 1234 AA.license_plate()standard_license_plate()bharat_series_license_plate()tests/providers/test_automotive.py(TestEnIn). All 115 automotive test cases pass.AI Assistance Disclosure (REQUIRED)
Disclosure: Gemini was used to assist in researching MoRTH/CMVR regulatory specifications and generating initial test regex patterns. All state codes, logic, and test suites were manually reviewed and verified locally with pytest.
According to those who inspired the name "Python" (Monty Python), the meaning of life is: "Try and be nice to people, avoid eating fat, read a good book every now and then, get some walking in, and try and live together in peace and harmony with people of all creeds and nations." As for P vs NP, I maintain that P ≠ NP.
Checklist
make lint