From 6114c28b2f26f833177974bcc2aa116ba4844a21 Mon Sep 17 00:00:00 2001 From: Daniel Yohan Date: Thu, 18 Jul 2019 11:28:25 -0300 Subject: [PATCH] Change " to ' --- bothub/api/v1/views.py | 10 ++++----- bothub/api/v2/evaluate/views.py | 34 +++++++++++++++---------------- bothub/api/v2/repository/views.py | 6 +++--- bothub/settings.py | 8 ++++---- bothub/urls.py | 11 +++++----- 5 files changed, 34 insertions(+), 35 deletions(-) diff --git a/bothub/api/v1/views.py b/bothub/api/v1/views.py index b642dd4d..84311ce4 100644 --- a/bothub/api/v1/views.py +++ b/bothub/api/v1/views.py @@ -412,7 +412,7 @@ def create(self, request, *args, **kwargs): openapi.Parameter( 'nickname', openapi.IN_QUERY, - description="Nickname User to find repositories", + description='Nickname User to find repositories', type=openapi.TYPE_STRING ), ] @@ -964,14 +964,14 @@ class RepositoryAuthorizationViewSet( openapi.Parameter( 'repository__uuid', openapi.IN_PATH, - description="Repository UUID", + description='Repository UUID', type=openapi.TYPE_STRING, required=True ), openapi.Parameter( 'user__nickname', openapi.IN_QUERY, - description="Nickname User", + description='Nickname User', type=openapi.TYPE_STRING, required=True ), @@ -985,14 +985,14 @@ class RepositoryAuthorizationViewSet( openapi.Parameter( 'repository__uuid', openapi.IN_PATH, - description="Repository UUID", + description='Repository UUID', type=openapi.TYPE_STRING, required=True ), openapi.Parameter( 'user__nickname', openapi.IN_QUERY, - description="Nickname User", + description='Nickname User', type=openapi.TYPE_STRING, required=True ), diff --git a/bothub/api/v2/evaluate/views.py b/bothub/api/v2/evaluate/views.py index 0dd5153d..87e13e6d 100644 --- a/bothub/api/v2/evaluate/views.py +++ b/bothub/api/v2/evaluate/views.py @@ -33,8 +33,8 @@ openapi.Parameter( 'repository_uuid', openapi.IN_QUERY, - description="Repository UUID, calling " - "the parameter through url", + description='Repository UUID, calling ' + 'the parameter through url', type=openapi.TYPE_STRING, required=True ), @@ -48,8 +48,8 @@ openapi.Parameter( 'repository_uuid', openapi.IN_QUERY, - description="Repository UUID, calling " - "the parameter through url", + description='Repository UUID, calling ' + 'the parameter through url', type=openapi.TYPE_STRING, required=True ), @@ -63,8 +63,8 @@ openapi.Parameter( 'repository_uuid', openapi.IN_QUERY, - description="Repository UUID, calling " - "the parameter through url", + description='Repository UUID, calling ' + 'the parameter through url', type=openapi.TYPE_STRING, required=True ), @@ -78,8 +78,8 @@ openapi.Parameter( 'repository_uuid', openapi.IN_QUERY, - description="Repository UUID, calling " - "the parameter through url", + description='Repository UUID, calling ' + 'the parameter through url', type=openapi.TYPE_STRING, required=True ), @@ -93,8 +93,8 @@ openapi.Parameter( 'repository_uuid', openapi.IN_QUERY, - description="Repository UUID, calling " - "the parameter through url", + description='Repository UUID, calling ' + 'the parameter through url', type=openapi.TYPE_STRING, required=True ), @@ -108,8 +108,8 @@ openapi.Parameter( 'repository_uuid', openapi.IN_QUERY, - description="Repository UUID, calling " - "the parameter through url", + description='Repository UUID, calling ' + 'the parameter through url', type=openapi.TYPE_STRING, required=True ), @@ -161,29 +161,29 @@ def list(self, request, *args, **kwargs): openapi.Parameter( 'intent', openapi.IN_QUERY, - description="Filter a desired intent", + description='Filter a desired intent', type=openapi.TYPE_STRING, required=False ), openapi.Parameter( 'min', openapi.IN_QUERY, - description="Filter Confidence Percentage", + description='Filter Confidence Percentage', type=openapi.TYPE_INTEGER, required=False ), openapi.Parameter( 'max', openapi.IN_QUERY, - description="Filter Confidence Percentage", + description='Filter Confidence Percentage', type=openapi.TYPE_INTEGER, required=False ), openapi.Parameter( 'repository_uuid', openapi.IN_QUERY, - description="Repository UUID, calling " - "the parameter through url", + description='Repository UUID, calling ' + 'the parameter through url', type=openapi.TYPE_STRING, required=True ), diff --git a/bothub/api/v2/repository/views.py b/bothub/api/v2/repository/views.py index 9571d012..1239a0e6 100644 --- a/bothub/api/v2/repository/views.py +++ b/bothub/api/v2/repository/views.py @@ -47,14 +47,14 @@ class RepositoryViewSet( openapi.Parameter( 'user', openapi.IN_QUERY, - description="Nickname User to find repositories votes", + description='Nickname User to find repositories votes', type=openapi.TYPE_STRING ), openapi.Parameter( 'repository', openapi.IN_QUERY, - description="Repository UUID, returns a list of " - "users who voted for this repository", + description='Repository UUID, returns a list of ' + 'users who voted for this repository', type=openapi.TYPE_STRING ), ] diff --git a/bothub/settings.py b/bothub/settings.py index dc3a388b..9d006705 100644 --- a/bothub/settings.py +++ b/bothub/settings.py @@ -254,10 +254,10 @@ 'DOC_EXPANSION': 'list', 'APIS_SORTER': 'alpha', 'SECURITY_DEFINITIONS': { - "api_key": { - "type": "apiKey", - "name": "Authorization", - "in": "header" + 'api_key': { + 'type': 'apiKey', + 'name': 'Authorization', + 'in': 'header' }, }, } diff --git a/bothub/urls.py b/bothub/urls.py index fb300ca8..f31b8247 100644 --- a/bothub/urls.py +++ b/bothub/urls.py @@ -16,11 +16,11 @@ schema_view = get_schema_view( openapi.Info( - title="API Documentation", + title='API Documentation', default_version='v1.0.1', - description="Documentation", - terms_of_service="https://www.google.com/policies/terms/", - contact=openapi.Contact(email="bothub@ilhasoft.com.br"), + description='Documentation', + terms_of_service='https://www.google.com/policies/terms/', + contact=openapi.Contact(email='bothub@ilhasoft.com.br'), license=openapi.License(name="GPL-3.0"), ), public=True, @@ -41,8 +41,7 @@ download_bot_data, name='download_bot_data'), re_path(r'^swagger(?P\.json|\.yaml)$', schema_view.without_ui()), - path('swagger/', schema_view.with_ui('swagger')), - path('redoc/', schema_view.with_ui('redoc')) + path('swagger/', schema_view.with_ui('swagger')) ] if settings.DEBUG: