Skip to content

Add am_ET phone_number provider for Ethiopia#2353

Open
jasur-py wants to merge 1 commit intojoke2k:masterfrom
jasur-py:feature/am-et-phone-number
Open

Add am_ET phone_number provider for Ethiopia#2353
jasur-py wants to merge 1 commit intojoke2k:masterfrom
jasur-py:feature/am-et-phone-number

Conversation

@jasur-py
Copy link
Copy Markdown
Contributor

Implement Ethio Telecom (09 / +2519) and Safaricom Ethiopia (07 / +2517) mobile formats per the national numbering plan.

Closes #2335

Made-with: Cursor

What does this change

Adds a new phone number provider for the am_ET locale at faker/providers/phone_number/am_ET/init.py.
Defines four formats for synthetic mobile numbers:
Domestic Ethio Telecom: 09 + 8 digits.
International Ethio Telecom: +251 + 9 + 8 digits (trunk 0 omitted).
Domestic Safaricom Ethiopia: 07 + 8 digits.
International Safaricom Ethiopia: +251 + 7 + 8 digits.
Documents the numbering-plan basis and a reference link in module comments.
Adds TestAmEt in tests/providers/test_phone_number.py, which samples faker.phone_number() and asserts each value matches
(?:09\d{8}|07\d{8}|+2519\d{8}|+2517\d{8}).

What was wrong

Faker did not ship an am_ET phone number provider, so Ethiopian locale users could not get phone numbers aligned with the national mobile prefixes (09 / 07 and +251 variants). That gap is tracked in #2335.

How this fixes it

Locale discovery picks up the new provider under phone_number/am_ET, so Faker("am_ET") (and Amharic Ethiopia usage that resolves to this locale) can generate plausible mobile strings for both major operators. The test locks the allowed shapes so regressions are caught in CI.

Fixes #2335

AI Assistance Disclosure (REQUIRED)

  • No AI tools were used in preparing this PR.
  • If AI tools were used, I have disclosed which ones, and fully reviewed and verified their output.
    Disclosure: Cursor was used to help implement and document these changes; all edits were reviewed for correctness against the Ethiopian numbering plan.

Checklist

  • I have read the documentation about CONTRIBUTING
  • I have read the documentation about Coding style
  • I have run make lint
image

Implement Ethio Telecom (09 / +2519) and Safaricom Ethiopia (07 / +2517)
mobile formats per the national numbering plan.

Closes joke2k#2335

Made-with: Cursor
Copy link
Copy Markdown
Collaborator

@fcurella fcurella left a comment

Choose a reason for hiding this comment

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

Thank you!

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.

Add am_ET (Ethiopia) locale and phone_number provider

2 participants