Skip to content

Commit 7985539

Browse files
committed
Lint fixes
1 parent c37748b commit 7985539

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

readthedocs/api/v3/mixins.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from django.contrib.auth.models import User
21
from django.shortcuts import get_object_or_404
32
from rest_framework.exceptions import NotFound
43

readthedocs/api/v3/urls.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from .routers import DefaultRouterWithNesting
22
from .views import (
3-
BuildsViewSet,
43
BuildsCreateViewSet,
4+
BuildsViewSet,
55
ProjectsViewSet,
66
SubprojectRelationshipViewSet,
77
TranslationRelationshipViewSet,

readthedocs/api/v3/views.py

+8-11
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,7 @@ def get_view_description(self, *args, **kwargs): # pylint: disable=arguments-di
163163

164164
@action(detail=True, methods=['get'])
165165
def superproject(self, request, project_slug):
166-
"""
167-
Return the superproject of a ``Project``.
168-
"""
166+
"""Return the superproject of a ``Project``."""
169167
project = self.get_object()
170168
try:
171169
superproject = project.superprojects.first().parent
@@ -180,15 +178,15 @@ class SubprojectRelationshipViewSet(APIv3Settings, ProjectQuerySetMixin,
180178
ListModelMixin, GenericViewSet):
181179

182180
# Markdown docstring exposed at BrowsableAPIRenderer.
183-
"""
184-
List subprojects of a ``Project``.
185-
"""
181+
182+
"""List subprojects of a ``Project``."""
186183

187184
# Private/Internal docstring
185+
188186
"""
189187
The main query is done via the ``NestedViewSetMixin`` using the
190188
``parents_query_lookups`` defined when registering the urls.
191-
"""
189+
""" # noqa
192190

193191
model = Project
194192
lookup_field = 'slug'
@@ -202,15 +200,14 @@ class TranslationRelationshipViewSet(APIv3Settings, ProjectQuerySetMixin,
202200
ListModelMixin, GenericViewSet):
203201

204202
# Markdown docstring exposed at BrowsableAPIRenderer.
205-
"""
206-
List translations of a ``Project``.
207-
"""
203+
204+
"""List translations of a ``Project``."""
208205

209206
# Private/Internal docstring
210207
"""
211208
The main query is done via the ``NestedViewSetMixin`` using the
212209
``parents_query_lookups`` defined when registering the urls.
213-
"""
210+
""" # noqa
214211

215212
model = Project
216213
lookup_field = 'slug'

readthedocs/oauth/services/gitlab.py

-2
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@
1111

1212
from readthedocs.builds.utils import get_gitlab_username_repo
1313
from readthedocs.integrations.models import Integration
14-
from readthedocs.integrations.utils import get_secret
1514
from readthedocs.projects.models import Project
1615

1716
from ..models import RemoteOrganization, RemoteRepository
1817
from .base import Service, SyncServiceError
1918

2019

21-
2220
try:
2321
from urlparse import urljoin, urlparse
2422
except ImportError:

0 commit comments

Comments
 (0)