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 logic to handle phonenumbers with country code #1426

Merged
merged 3 commits into from
Aug 5, 2024

Conversation

kauabh
Copy link
Contributor

@kauabh kauabh commented Aug 1, 2024

Change Description

Hi, long time user but first time contributing. Happy to learn & correct if something required. This is a minor change that a bug that I reported. The currently used phonenumbers.PhoneNumberMatcher function doesn't handle phone number starting with country code, the fucntion docstring (below) says to use different "region" parameter for such phone numbers.

country -- The country to assume for phone numbers not written in
international format (with a leading plus, or with the
international dialing prefix of the specified region). May be
None or "ZZ" if only numbers with a leading plus should be
considered.

Added code handles such phone number separately & resolves the mentioned bug.

Issue reference

This PR fixes issue #1425

Checklist

  • I have reviewed the contribution guidelines
  • My code includes unit test
  • All unit tests and lint checks pass locally

@omri374
Copy link
Contributor

omri374 commented Aug 2, 2024

Thanks! Can you please add unit tests to this new functionality? There is a test_phone_number_recpgnizer.py file you could add tests to.

@kauabh
Copy link
Contributor Author

kauabh commented Aug 2, 2024

Yes, sure! I will take care of that.

@kauabh
Copy link
Contributor Author

kauabh commented Aug 2, 2024

Hi @omri374 I have added test case for the PR

@omri374
Copy link
Contributor

omri374 commented Aug 2, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@omri374
Copy link
Contributor

omri374 commented Aug 4, 2024

@kaushikabhishek87 we have a non-related issue with our CI. Working on it.

@omri374
Copy link
Contributor

omri374 commented Aug 4, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@omri374 omri374 merged commit 6c51464 into microsoft:main Aug 5, 2024
32 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.

2 participants