We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
pycountry.countries.search_fuzzy
I'm not sure if I'm doing something wrong, but the following code is throwing a mypy error:
matches = pycountry.countries.search_fuzzy(country_name) if matches: return matches[0].alpha_2
The mypy error is:
"type[ExistingCountries]" has no attribute "alpha_2" Mypy[attr-defined]
But if I check in the interpreter, I can see it is indeed an attribute there:
In [19]: type(country) Out[19]: pycountry.db.Country In [20]: country.alpha_2 Out[20]: 'GB'
Perhaps an issue in the typing that was added recently?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm not sure if I'm doing something wrong, but the following code is throwing a mypy error:
The mypy error is:
But if I check in the interpreter, I can see it is indeed an attribute there:
Perhaps an issue in the typing that was added recently?
The text was updated successfully, but these errors were encountered: