Skip to content

Commit 0c6302a

Browse files
authored
Fix mypy error type annotation needed (#12272)
1 parent 0b2cb06 commit 0c6302a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/openapi-generator/src/main/resources/python-flask/base_model_.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ T = typing.TypeVar('T')
1212
{{/supportPython2}}
1313

1414

15-
class Model(object):
15+
class Model({{#supportPython2}}object{{/supportPython2}}):
1616
# openapiTypes: The key is attribute name and the
1717
# value is attribute type.
18-
openapi_types = {}
18+
openapi_types{{^supportPython2}}: typing.Dict[str, type]{{/supportPython2}} = {}
1919

2020
# attributeMap: The key is attribute name and the
2121
# value is json key in definition.
22-
attribute_map = {}
22+
attribute_map{{^supportPython2}}: typing.Dict[str, str]{{/supportPython2}} = {}
2323

2424
@classmethod
2525
def from_dict(cls{{^supportPython2}}: typing.Type[T]{{/supportPython2}}, dikt){{^supportPython2}} -> T{{/supportPython2}}:

0 commit comments

Comments
 (0)