xsdata
xsdata copied to clipboard
Override base class field with enumeration and mypy
Restricting complex/simple content with enumeration doesn't play nicely with mypy
from #661
mypy generali/models
generali/models/com/generali/enterprise_services/core/gbo/common/v1/uom_temperature_code_type.py:14: error: Incompatible types in assignment (expression has type "Optional[UomTemperatureCodeTypeValue]", base class "CodeType" defined the type as "str")
generali/models/com/generali/enterprise_services/core/gbo/common/v1/uom_amount_of_information_sicode_type.py:17: error: Incompatible types in assignment (expression has type "Optional[UomAmountOfInformationSicodeTypeValue]", base class "CodeType" defined the type as "str")
generali/models/com/generali/enterprise_services/core/gbo/common/v1/uom_amount_of_information_code_type.py:14: error: Incompatible types in assignment (expression has type "Optional[UomAmountOfInformationCodeTypeValue]", base class "CodeType" defined the type as "str")
generali/models/com/generali/enterprise_services/core/gbo/common/v1/uo_mtime_code_type.py:17: error: Incompatible types in assignment (expression has type "Optional[UoMtimeCodeTypeValue]", base class "CodeType" defined the type as "str")
generali/models/com/generali/enterprise_services/core/gbo/common/v1/ukspecified_quantity_solid_fuel_code_type.py:18: error: Incompatible types in assignment (expression has type "Optional[UkspecifiedQuantitySolidFuelCodeTypeValue]", base class "CodeType" defined the type as "str")
generali/models/com/generali/enterprise_services/core/gbo/common/v1/ukspecified_quantity_alcohol_code_type.py:18: error: Incompatible types in assignment (expression has type "Optional[UkspecifiedQuantityAlcoholCodeTypeValue]", base class "CodeType" defined the type as "str")
generali/models/com/generali/enterprise_services/core/gbo/common/v1/metric_uo_mmass_code_type.py:17: error: Incompatible types in assignment (expression has type "Optional[MetricUoMmassCodeTypeValue]", base class "CodeType" defined the type as "str")
generali/models/com/generali/enterprise_services/core/gbo/common/v1/metric_uo_mlength_code_type.py:17: error: Incompatible types in assignment (expression has type "Optional[MetricUoMlengthCodeTypeValue]", base class "CodeType" defined the type as "str")
generali/models/com/generali/enterprise_services/core/gbo/common/v1/marital_status_code_type.py:15: error: Incompatible types in assignment (expression has type "Optional[MaritalStatusCodeTypeValue]", base class "CodeType" defined the type as "str")
generali/models/com/generali/enterprise_services/core/gbo/common/v1/gender_code_type.py:16: error: Incompatible types in assignment (expression has type "Optional[GenderCodeTypeValue]", base class "CodeType" defined the type as "str")
Investigate any possible workarounds/solutions, maybe use python's Literal