-
Notifications
You must be signed in to change notification settings - Fork 300
Open
Description
After the addition of fields.pyi in d6968e3, Country.code can now be None.
Looking at the actual implementation in Country.__init__(), which accepts code: str and then does:
self.code = self.countries.alpha2(code) or code...it doesn't look like Country.code can actually ever be None?
Reason I'm asking is that we're running into ~20 typing warnings in our codebase when upgrading to django-countries 8.x because we've been under the belief that if we have a Country, we always have a code too.
Is this assumption no longer correct, or is the new Country.code type too wide?
Metadata
Metadata
Assignees
Labels
No labels