Skip to content

Commit c1cc59e

Browse files
committed
autopep8 in swagger.sh
1 parent c6015eb commit c1cc59e

5 files changed

Lines changed: 11 additions & 9 deletions

File tree

dohq_teamcity/api/build_type_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6020,8 +6020,8 @@ def __get_example_new_project_description_compatibility_version1_with_http_info(
60206020
if key not in all_params:
60216021
raise TypeError(
60226022
"Got an unexpected keyword argument '%s'"
6023-
" to method get_example_new_project_description_compatibility_version1" %
6024-
key)
6023+
" to method get_example_new_project_description_compatibility_version1" % key
6024+
)
60256025
params[key] = val
60266026
del params['kwargs']
60276027
# verify the required parameter 'bt_locator' is set

dohq_teamcity/api/project_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2501,8 +2501,8 @@ def __get_example_new_project_description_compatibility_version1_with_http_info(
25012501
if key not in all_params:
25022502
raise TypeError(
25032503
"Got an unexpected keyword argument '%s'"
2504-
" to method get_example_new_project_description_compatibility_version1" %
2505-
key)
2504+
" to method get_example_new_project_description_compatibility_version1" % key
2505+
)
25062506
params[key] = val
25072507
del params['kwargs']
25082508
# verify the required parameter 'project_locator' is set

swagger.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ do
3232
mv "$file" "${file%.md}.rst"
3333
done
3434
popd
35+
36+
# Auto PEP8
37+
pip install autopep8
38+
autopep8 --in-place --aggressive --max-line-length 120 --recursive dohq_teamcity

swagger/template/api.mustache

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class {{classname}}(object):
2626

2727
def __init__(self, api_client=None):
2828
self.api_client = api_client
29-
{{#operation}}
3029

30+
{{#operation}}
3131
def {{operationId}}(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs): # noqa: E501
3232
"""{{#summary}}{{.}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501
3333

@@ -59,8 +59,7 @@ class {{classname}}(object):
5959
(data) = self.__{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs) # noqa: E501
6060
return data
6161

62-
{{/operation}}
63-
{{#operation}}
62+
{{/operation}}{{#operation}}
6463
def __{{operationId}}_with_http_info(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs): # noqa: E501
6564
"""{{#summary}}{{.}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501
6665

swagger/template/model.mustache

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,5 +166,4 @@ class {{classname}}({{#parent}}{{parent}}{{/parent}}{{^parent}}TeamCityObject{{/
166166
return self.discriminator_value_class_map.get(discriminator_value)
167167

168168
{{/discriminator}}
169-
{{/model}}
170-
{{/models}}
169+
{{/model}}{{/models}}

0 commit comments

Comments
 (0)