Skip to content

Commit d35e41b

Browse files
Jakob SchmutzJakob Schmutz
authored andcommitted
removal of type hints in quotes
1 parent 59a4272 commit d35e41b

File tree

7 files changed

+63
-63
lines changed

7 files changed

+63
-63
lines changed

modules/openapi-generator/src/main/resources/flaskConnexion/model.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class {{classname}}(Model):
2525
{{/-last}}
2626
{{/enumVars}}{{/allowableValues}}
2727

28-
def __init__(self{{#vars}}, {{name}}{{^supportPython2}}: '{{dataType}}'{{/supportPython2}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501
28+
def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501
2929
"""{{classname}} - a model defined in OpenAPI
3030

3131
{{#vars}}
@@ -62,7 +62,7 @@ class {{classname}}(Model):
6262

6363
{{/-first}}
6464
@property
65-
def {{name}}(self){{^supportPython2}} -> '{{dataType}}'{{/supportPython2}}:
65+
def {{name}}(self):
6666
"""Gets the {{name}} of this {{classname}}.
6767

6868
{{#description}}
@@ -75,7 +75,7 @@ class {{classname}}(Model):
7575
return self._{{name}}
7676

7777
@{{name}}.setter
78-
def {{name}}(self, {{name}}{{^supportPython2}}: '{{dataType}}'{{/supportPython2}}):
78+
def {{name}}(self, {{name}}):
7979
"""Sets the {{name}} of this {{classname}}.
8080

8181
{{#description}}

samples/server/petstore/flaskConnexion/openapi_server/models/api_response.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ApiResponse(Model):
1515
Do not edit the class manually.
1616
"""
1717

18-
def __init__(self, code: 'int'=None, type: 'str'=None, message: 'str'=None): # noqa: E501
18+
def __init__(self, code=None, type=None, message=None): # noqa: E501
1919
"""ApiResponse - a model defined in OpenAPI
2020
2121
:param code: The code of this ApiResponse. # noqa: E501
@@ -53,7 +53,7 @@ def from_dict(cls, dikt) -> 'ApiResponse':
5353
return util.deserialize_model(dikt, cls)
5454

5555
@property
56-
def code(self) -> 'int':
56+
def code(self):
5757
"""Gets the code of this ApiResponse.
5858
5959
@@ -63,7 +63,7 @@ def code(self) -> 'int':
6363
return self._code
6464

6565
@code.setter
66-
def code(self, code: 'int'):
66+
def code(self, code):
6767
"""Sets the code of this ApiResponse.
6868
6969
@@ -74,7 +74,7 @@ def code(self, code: 'int'):
7474
self._code = code
7575

7676
@property
77-
def type(self) -> 'str':
77+
def type(self):
7878
"""Gets the type of this ApiResponse.
7979
8080
@@ -84,7 +84,7 @@ def type(self) -> 'str':
8484
return self._type
8585

8686
@type.setter
87-
def type(self, type: 'str'):
87+
def type(self, type):
8888
"""Sets the type of this ApiResponse.
8989
9090
@@ -95,7 +95,7 @@ def type(self, type: 'str'):
9595
self._type = type
9696

9797
@property
98-
def message(self) -> 'str':
98+
def message(self):
9999
"""Gets the message of this ApiResponse.
100100
101101
@@ -105,7 +105,7 @@ def message(self) -> 'str':
105105
return self._message
106106

107107
@message.setter
108-
def message(self, message: 'str'):
108+
def message(self, message):
109109
"""Sets the message of this ApiResponse.
110110
111111

samples/server/petstore/flaskConnexion/openapi_server/models/category.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Category(Model):
1515
Do not edit the class manually.
1616
"""
1717

18-
def __init__(self, id: 'int'=None, name: 'str'=None): # noqa: E501
18+
def __init__(self, id=None, name=None): # noqa: E501
1919
"""Category - a model defined in OpenAPI
2020
2121
:param id: The id of this Category. # noqa: E501
@@ -48,7 +48,7 @@ def from_dict(cls, dikt) -> 'Category':
4848
return util.deserialize_model(dikt, cls)
4949

5050
@property
51-
def id(self) -> 'int':
51+
def id(self):
5252
"""Gets the id of this Category.
5353
5454
@@ -58,7 +58,7 @@ def id(self) -> 'int':
5858
return self._id
5959

6060
@id.setter
61-
def id(self, id: 'int'):
61+
def id(self, id):
6262
"""Sets the id of this Category.
6363
6464
@@ -69,7 +69,7 @@ def id(self, id: 'int'):
6969
self._id = id
7070

7171
@property
72-
def name(self) -> 'str':
72+
def name(self):
7373
"""Gets the name of this Category.
7474
7575
@@ -79,7 +79,7 @@ def name(self) -> 'str':
7979
return self._name
8080

8181
@name.setter
82-
def name(self, name: 'str'):
82+
def name(self, name):
8383
"""Sets the name of this Category.
8484
8585

samples/server/petstore/flaskConnexion/openapi_server/models/order.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Order(Model):
1515
Do not edit the class manually.
1616
"""
1717

18-
def __init__(self, id: 'int'=None, pet_id: 'int'=None, quantity: 'int'=None, ship_date: 'datetime'=None, status: 'str'=None, complete: 'bool'=False): # noqa: E501
18+
def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): # noqa: E501
1919
"""Order - a model defined in OpenAPI
2020
2121
:param id: The id of this Order. # noqa: E501
@@ -68,7 +68,7 @@ def from_dict(cls, dikt) -> 'Order':
6868
return util.deserialize_model(dikt, cls)
6969

7070
@property
71-
def id(self) -> 'int':
71+
def id(self):
7272
"""Gets the id of this Order.
7373
7474
@@ -78,7 +78,7 @@ def id(self) -> 'int':
7878
return self._id
7979

8080
@id.setter
81-
def id(self, id: 'int'):
81+
def id(self, id):
8282
"""Sets the id of this Order.
8383
8484
@@ -89,7 +89,7 @@ def id(self, id: 'int'):
8989
self._id = id
9090

9191
@property
92-
def pet_id(self) -> 'int':
92+
def pet_id(self):
9393
"""Gets the pet_id of this Order.
9494
9595
@@ -99,7 +99,7 @@ def pet_id(self) -> 'int':
9999
return self._pet_id
100100

101101
@pet_id.setter
102-
def pet_id(self, pet_id: 'int'):
102+
def pet_id(self, pet_id):
103103
"""Sets the pet_id of this Order.
104104
105105
@@ -110,7 +110,7 @@ def pet_id(self, pet_id: 'int'):
110110
self._pet_id = pet_id
111111

112112
@property
113-
def quantity(self) -> 'int':
113+
def quantity(self):
114114
"""Gets the quantity of this Order.
115115
116116
@@ -120,7 +120,7 @@ def quantity(self) -> 'int':
120120
return self._quantity
121121

122122
@quantity.setter
123-
def quantity(self, quantity: 'int'):
123+
def quantity(self, quantity):
124124
"""Sets the quantity of this Order.
125125
126126
@@ -131,7 +131,7 @@ def quantity(self, quantity: 'int'):
131131
self._quantity = quantity
132132

133133
@property
134-
def ship_date(self) -> 'datetime':
134+
def ship_date(self):
135135
"""Gets the ship_date of this Order.
136136
137137
@@ -141,7 +141,7 @@ def ship_date(self) -> 'datetime':
141141
return self._ship_date
142142

143143
@ship_date.setter
144-
def ship_date(self, ship_date: 'datetime'):
144+
def ship_date(self, ship_date):
145145
"""Sets the ship_date of this Order.
146146
147147
@@ -152,7 +152,7 @@ def ship_date(self, ship_date: 'datetime'):
152152
self._ship_date = ship_date
153153

154154
@property
155-
def status(self) -> 'str':
155+
def status(self):
156156
"""Gets the status of this Order.
157157
158158
Order Status # noqa: E501
@@ -163,7 +163,7 @@ def status(self) -> 'str':
163163
return self._status
164164

165165
@status.setter
166-
def status(self, status: 'str'):
166+
def status(self, status):
167167
"""Sets the status of this Order.
168168
169169
Order Status # noqa: E501
@@ -181,7 +181,7 @@ def status(self, status: 'str'):
181181
self._status = status
182182

183183
@property
184-
def complete(self) -> 'bool':
184+
def complete(self):
185185
"""Gets the complete of this Order.
186186
187187
@@ -191,7 +191,7 @@ def complete(self) -> 'bool':
191191
return self._complete
192192

193193
@complete.setter
194-
def complete(self, complete: 'bool'):
194+
def complete(self, complete):
195195
"""Sets the complete of this Order.
196196
197197

samples/server/petstore/flaskConnexion/openapi_server/models/pet.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Pet(Model):
1515
Do not edit the class manually.
1616
"""
1717

18-
def __init__(self, id: 'int'=None, category: 'Category'=None, name: 'str'=None, photo_urls: 'List[str]'=None, tags: 'List[Tag]'=None, status: 'str'=None): # noqa: E501
18+
def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501
1919
"""Pet - a model defined in OpenAPI
2020
2121
:param id: The id of this Pet. # noqa: E501
@@ -68,7 +68,7 @@ def from_dict(cls, dikt) -> 'Pet':
6868
return util.deserialize_model(dikt, cls)
6969

7070
@property
71-
def id(self) -> 'int':
71+
def id(self):
7272
"""Gets the id of this Pet.
7373
7474
@@ -78,7 +78,7 @@ def id(self) -> 'int':
7878
return self._id
7979

8080
@id.setter
81-
def id(self, id: 'int'):
81+
def id(self, id):
8282
"""Sets the id of this Pet.
8383
8484
@@ -89,7 +89,7 @@ def id(self, id: 'int'):
8989
self._id = id
9090

9191
@property
92-
def category(self) -> 'Category':
92+
def category(self):
9393
"""Gets the category of this Pet.
9494
9595
@@ -99,7 +99,7 @@ def category(self) -> 'Category':
9999
return self._category
100100

101101
@category.setter
102-
def category(self, category: 'Category'):
102+
def category(self, category):
103103
"""Sets the category of this Pet.
104104
105105
@@ -110,7 +110,7 @@ def category(self, category: 'Category'):
110110
self._category = category
111111

112112
@property
113-
def name(self) -> 'str':
113+
def name(self):
114114
"""Gets the name of this Pet.
115115
116116
@@ -120,7 +120,7 @@ def name(self) -> 'str':
120120
return self._name
121121

122122
@name.setter
123-
def name(self, name: 'str'):
123+
def name(self, name):
124124
"""Sets the name of this Pet.
125125
126126
@@ -133,7 +133,7 @@ def name(self, name: 'str'):
133133
self._name = name
134134

135135
@property
136-
def photo_urls(self) -> 'List[str]':
136+
def photo_urls(self):
137137
"""Gets the photo_urls of this Pet.
138138
139139
@@ -143,7 +143,7 @@ def photo_urls(self) -> 'List[str]':
143143
return self._photo_urls
144144

145145
@photo_urls.setter
146-
def photo_urls(self, photo_urls: 'List[str]'):
146+
def photo_urls(self, photo_urls):
147147
"""Sets the photo_urls of this Pet.
148148
149149
@@ -156,7 +156,7 @@ def photo_urls(self, photo_urls: 'List[str]'):
156156
self._photo_urls = photo_urls
157157

158158
@property
159-
def tags(self) -> 'List[Tag]':
159+
def tags(self):
160160
"""Gets the tags of this Pet.
161161
162162
@@ -166,7 +166,7 @@ def tags(self) -> 'List[Tag]':
166166
return self._tags
167167

168168
@tags.setter
169-
def tags(self, tags: 'List[Tag]'):
169+
def tags(self, tags):
170170
"""Sets the tags of this Pet.
171171
172172
@@ -177,7 +177,7 @@ def tags(self, tags: 'List[Tag]'):
177177
self._tags = tags
178178

179179
@property
180-
def status(self) -> 'str':
180+
def status(self):
181181
"""Gets the status of this Pet.
182182
183183
pet status in the store # noqa: E501
@@ -188,7 +188,7 @@ def status(self) -> 'str':
188188
return self._status
189189

190190
@status.setter
191-
def status(self, status: 'str'):
191+
def status(self, status):
192192
"""Sets the status of this Pet.
193193
194194
pet status in the store # noqa: E501

0 commit comments

Comments
 (0)