Skip to content

Commit

Permalink
autopep8 in swagger.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
allburov committed Oct 31, 2018
1 parent c6015eb commit c1cc59e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions dohq_teamcity/api/build_type_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6020,8 +6020,8 @@ def __get_example_new_project_description_compatibility_version1_with_http_info(
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_example_new_project_description_compatibility_version1" %
key)
" to method get_example_new_project_description_compatibility_version1" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'bt_locator' is set
Expand Down
4 changes: 2 additions & 2 deletions dohq_teamcity/api/project_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2501,8 +2501,8 @@ def __get_example_new_project_description_compatibility_version1_with_http_info(
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_example_new_project_description_compatibility_version1" %
key)
" to method get_example_new_project_description_compatibility_version1" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'project_locator' is set
Expand Down
4 changes: 4 additions & 0 deletions swagger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ do
mv "$file" "${file%.md}.rst"
done
popd

# Auto PEP8
pip install autopep8
autopep8 --in-place --aggressive --max-line-length 120 --recursive dohq_teamcity
5 changes: 2 additions & 3 deletions swagger/template/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class {{classname}}(object):

def __init__(self, api_client=None):
self.api_client = api_client
{{#operation}}

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

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

{{/operation}}
{{#operation}}
{{/operation}}{{#operation}}
def __{{operationId}}_with_http_info(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs): # noqa: E501
"""{{#summary}}{{.}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501

Expand Down
3 changes: 1 addition & 2 deletions swagger/template/model.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,4 @@ class {{classname}}({{#parent}}{{parent}}{{/parent}}{{^parent}}TeamCityObject{{/
return self.discriminator_value_class_map.get(discriminator_value)

{{/discriminator}}
{{/model}}
{{/models}}
{{/model}}{{/models}}

0 comments on commit c1cc59e

Please sign in to comment.