When the documented example use-case of CountryAlpha2 is used with Mypy, it results in a type error.
Code:
from pydantic import BaseModel
from pydantic_extra_types.country import CountryAlpha2
class Product(BaseModel):
made_in: CountryAlpha2
product = Product(made_in='ES')
print(product)
# > made_in='ES'
Results in:
Argument "made_in" to "Product" has incompatible type "str"; expected "CountryAlpha2" [arg-type]