Fix mypy error type annotation needed (#12272)

This commit is contained in:
Oliver Ford 2022-04-30 09:11:08 +00:00 committed by GitHub
parent 0b2cb06229
commit 0c6302a313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,14 +12,14 @@ T = typing.TypeVar('T')
{{/supportPython2}} {{/supportPython2}}
class Model(object): class Model({{#supportPython2}}object{{/supportPython2}}):
# openapiTypes: The key is attribute name and the # openapiTypes: The key is attribute name and the
# value is attribute type. # value is attribute type.
openapi_types = {} openapi_types{{^supportPython2}}: typing.Dict[str, type]{{/supportPython2}} = {}
# attributeMap: The key is attribute name and the # attributeMap: The key is attribute name and the
# value is json key in definition. # value is json key in definition.
attribute_map = {} attribute_map{{^supportPython2}}: typing.Dict[str, str]{{/supportPython2}} = {}
@classmethod @classmethod
def from_dict(cls{{^supportPython2}}: typing.Type[T]{{/supportPython2}}, dikt){{^supportPython2}} -> T{{/supportPython2}}: def from_dict(cls{{^supportPython2}}: typing.Type[T]{{/supportPython2}}, dikt){{^supportPython2}} -> T{{/supportPython2}}: