forked from loafle/openapi-generator-original
python: enable more mypy checks 1/n (#17556)
* python: more mypy checks * mypy: check_untyped_defs * mypy: disallow_subclassing_any * mypy: disallow_untyped_decorators * mypy: disallow_any_generics
This commit is contained in:
@@ -73,7 +73,7 @@ class Bird(BaseModel):
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict]) -> Optional[Self]:
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Bird from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
@@ -73,7 +73,7 @@ class Category(BaseModel):
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict]) -> Optional[Self]:
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Category from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
@@ -76,7 +76,7 @@ class DataQuery(Query):
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict]) -> Optional[Self]:
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DataQuery from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
@@ -106,7 +106,7 @@ class DefaultValue(BaseModel):
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict]) -> Optional[Self]:
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DefaultValue from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
@@ -75,7 +75,7 @@ class NumberPropertiesOnly(BaseModel):
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict]) -> Optional[Self]:
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of NumberPropertiesOnly from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
@@ -99,7 +99,7 @@ class Pet(BaseModel):
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict]) -> Optional[Self]:
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Pet from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
@@ -84,7 +84,7 @@ class Query(BaseModel):
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Dict) -> Optional[Self]:
|
||||
def from_dict(cls, obj: Dict[str, Any]) -> Optional[Self]:
|
||||
"""Create an instance of Query from a dict"""
|
||||
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ class Tag(BaseModel):
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict]) -> Optional[Self]:
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Tag from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
@@ -75,7 +75,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(BaseMod
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict]) -> Optional[Self]:
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
@@ -72,7 +72,7 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(BaseModel):
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict]) -> Optional[Self]:
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user