-
Notifications
You must be signed in to change notification settings - Fork 58
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
Fix PC encoding for Brazil #36
base: main
Are you sure you want to change the base?
Conversation
Thanks @willidert . We could add optional validation via the For now this is a 1 file package ( To fix merge conflicts please use back see https://github.com/symerio/pgeocode/blob/master/doc/contributing.rst#code-style for more details. |
Also if we want to do this check, the mechanism needs to be generic enough so it can be easily extended to other countries. Maybe something like, class _CheckPostalCode:
def __init__(self, country):
self.country = country
def __call__(self, postal_code):
if self.country == "BR":
...
else:
raise NotImplementedError |
hi @rth , i've been a little busy, sorry. I'll make the changes. Thank you very much for the suggestions and support. |
Sorry, i have problems with github actions. |
Thx for the opportunity, I hope it helped. I had a little difficulty in the tests. I'm sorry if something is strange. I am available for any correction. |
The geonames does not work for all CEPs in Brazil. I added a function that checks if the zip code is valid for geonames.
Closes #30