fix main.BaseModel.(dict, json) fields types
* fix main.BaseModel.(dict, json) fields types
fix main.BaseModel.dict fields (include, exclude, skip_defaults) types
fix main.BaseModel.json fields (include, exclude, skip_defaults) types
* fix types for BaseModel.copy, BaseModel._iter
fix types for BaseModel.copy fields: include, exclude, update
BaseModel._iter fields: include, exclude
@@ -420,10 +420,10 @@ class BaseModel(Representation, metaclass=ModelMetaclass):
def dict(
self,
*,
- include: Union['AbstractSetIntStr', 'MappingIntStrAny'] = None,
- exclude: Union['AbstractSetIntStr', 'MappingIntStrAny'] = None,
+ include: Optional[Union['AbstractSetIntStr', 'MappingIntStrAny']] = None,
+ exclude: Optional[Union['AbstractSetIntStr', 'MappingIntStrAny']] = None,
by_alias: bool = False,
- skip_defaults: bool = None,
+ skip_defaults: Optional[bool] = None,
exclude_unset: bool = False,
exclude_defaults: bool = False,
exclude_none: bool = False,
@@ -456,10 +456,10 @@ class BaseModel(Representation, metaclass=ModelMetaclass):
def json(
self,
*,
- include: Union['AbstractSetIntStr', 'MappingIntStrAny'] = None,
- exclude: Union['AbstractSetIntStr', 'MappingIntStrAny'] = None,
+ include: Optional[Union['AbstractSetIntStr', 'MappingIntStrAny']] = None,
+ exclude: Optional[Union['AbstractSetIntStr', 'MappingIntStrAny']] = None,
by_alias: bool = False,
- skip_defaults: bool = None,
+ skip_defaults: Optional[bool] = None,
exclude_unset: bool = False,
exclude_defaults: bool = False,
exclude_none: bool = False,
@@ -621,9 +621,9 @@ class BaseModel(Representation, metaclass=ModelMetaclass):
def copy(
self: 'Model',
*,
- include: Union['AbstractSetIntStr', 'MappingIntStrAny'] = None,
- exclude: Union['AbstractSetIntStr', 'MappingIntStrAny'] = None,
- update: 'DictStrAny' = None,
+ include: Optional[Union['AbstractSetIntStr', 'MappingIntStrAny']] = None,
+ exclude: Optional[Union['AbstractSetIntStr', 'MappingIntStrAny']] = None,
+ update: Optional['DictStrAny'] = None,
deep: bool = False,
) -> 'Model':
"""
@@ -805,8 +805,8 @@ class BaseModel(Representation, metaclass=ModelMetaclass):
self,
to_dict: bool = False,
by_alias: bool = False,
- include: Union['AbstractSetIntStr', 'MappingIntStrAny'] = None,
- exclude: Union['AbstractSetIntStr', 'MappingIntStrAny'] = None,
+ include: Optional[Union['AbstractSetIntStr', 'MappingIntStrAny']] = None,
+ exclude: Optional[Union['AbstractSetIntStr', 'MappingIntStrAny']] = None,
exclude_unset: bool = False,
exclude_defaults: bool = False,
exclude_none: bool = False,
