Skip to content

Commit 1c0d0c0

Browse files
committed
Lint fixes
1 parent c37748b commit 1c0d0c0

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-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

+6-11
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ class ProjectsViewSet(APIv3Settings, ProjectQuerySetMixin, NestedViewSetMixin,
6565
FlexFieldsMixin, ReadOnlyModelViewSet):
6666

6767
# Markdown docstring is automatically rendered by BrowsableAPIRenderer.
68-
6968
"""
7069
Endpoints related to ``Project`` objects.
7170
@@ -163,9 +162,7 @@ def get_view_description(self, *args, **kwargs): # pylint: disable=arguments-di
163162

164163
@action(detail=True, methods=['get'])
165164
def superproject(self, request, project_slug):
166-
"""
167-
Return the superproject of a ``Project``.
168-
"""
165+
"""Return the superproject of a ``Project``."""
169166
project = self.get_object()
170167
try:
171168
superproject = project.superprojects.first().parent
@@ -180,11 +177,11 @@ class SubprojectRelationshipViewSet(APIv3Settings, ProjectQuerySetMixin,
180177
ListModelMixin, GenericViewSet):
181178

182179
# Markdown docstring exposed at BrowsableAPIRenderer.
183-
"""
184-
List subprojects of a ``Project``.
185-
"""
180+
181+
"""List subprojects of a ``Project``."""
186182

187183
# Private/Internal docstring
184+
188185
"""
189186
The main query is done via the ``NestedViewSetMixin`` using the
190187
``parents_query_lookups`` defined when registering the urls.
@@ -202,15 +199,13 @@ class TranslationRelationshipViewSet(APIv3Settings, ProjectQuerySetMixin,
202199
ListModelMixin, GenericViewSet):
203200

204201
# Markdown docstring exposed at BrowsableAPIRenderer.
205-
"""
206-
List translations of a ``Project``.
207-
"""
202+
"""List translations of a ``Project``."""
208203

209204
# Private/Internal docstring
210205
"""
211206
The main query is done via the ``NestedViewSetMixin`` using the
212207
``parents_query_lookups`` defined when registering the urls.
213-
"""
208+
""" # noqa
214209

215210
model = Project
216211
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)