diff --git a/common b/common index 4af0fffd2cb..e2f4c6582e2 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 4af0fffd2cbeeb40f0a71b875beb99d6dc88a355 +Subproject commit e2f4c6582e214b50d604015a82e4ddc493392236 diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css index ee43e722512..3ed87891439 100644 --- a/docs/_static/css/custom.css +++ b/docs/_static/css/custom.css @@ -20,4 +20,4 @@ text-rendering: auto; -webkit-font-smoothing: antialiased; -} \ No newline at end of file +} diff --git a/media/css/header.css b/media/css/header.css index 93f129720b6..9b68d12628b 100644 --- a/media/css/header.css +++ b/media/css/header.css @@ -40,4 +40,3 @@ .ui-autocomplete { background: #fff; text-align: left; border: 1px solid #bfbfbf; } .ui-state-hover { background: #eee; } .ui-menu-item a { display: block; padding: 3px 10px; } - diff --git a/media/javascript/searchtools.js b/media/javascript/searchtools.js index 3f8cad9d75c..3355437b330 100644 --- a/media/javascript/searchtools.js +++ b/media/javascript/searchtools.js @@ -512,4 +512,4 @@ var Search = { $(document).ready(function() { Search.init(); -}); \ No newline at end of file +}); diff --git a/readthedocs/api/v3/proxied_views.py b/readthedocs/api/v3/proxied_views.py index 03733af0e84..0e11afa910c 100644 --- a/readthedocs/api/v3/proxied_views.py +++ b/readthedocs/api/v3/proxied_views.py @@ -1,6 +1,6 @@ +from readthedocs.core.mixins import ProxiedAPIMixin from readthedocs.core.utils.extend import SettingsOverrideObject from readthedocs.embed.v3.views import EmbedAPIBase -from readthedocs.core.mixins import ProxiedAPIMixin class ProxiedEmbedAPIBase(ProxiedAPIMixin, EmbedAPIBase): diff --git a/readthedocs/api/v3/tests/test_environmentvariables.py b/readthedocs/api/v3/tests/test_environmentvariables.py index e53053e0d42..14f2ccf48b2 100644 --- a/readthedocs/api/v3/tests/test_environmentvariables.py +++ b/readthedocs/api/v3/tests/test_environmentvariables.py @@ -1,9 +1,10 @@ -from .mixins import APIEndpointMixin +import django_dynamic_fixture as fixture from django.urls import reverse -import django_dynamic_fixture as fixture from readthedocs.projects.models import EnvironmentVariable +from .mixins import APIEndpointMixin + class EnvironmentVariablessEndpointTests(APIEndpointMixin): def setUp(self): diff --git a/readthedocs/api/v3/tests/test_remoteorganizations.py b/readthedocs/api/v3/tests/test_remoteorganizations.py index e76cc8c5800..7a7f3e4b962 100644 --- a/readthedocs/api/v3/tests/test_remoteorganizations.py +++ b/readthedocs/api/v3/tests/test_remoteorganizations.py @@ -1,13 +1,10 @@ -from django.urls import reverse - -from allauth.socialaccount.models import SocialAccount import django_dynamic_fixture as fixture +from allauth.socialaccount.models import SocialAccount +from django.urls import reverse from readthedocs.oauth.constants import GITHUB -from readthedocs.oauth.models import ( - RemoteOrganization, - RemoteOrganizationRelation, -) +from readthedocs.oauth.models import RemoteOrganization, RemoteOrganizationRelation + from .mixins import APIEndpointMixin diff --git a/readthedocs/api/v3/tests/test_remoterepositories.py b/readthedocs/api/v3/tests/test_remoterepositories.py index dfab056b100..f9d85044eb2 100644 --- a/readthedocs/api/v3/tests/test_remoterepositories.py +++ b/readthedocs/api/v3/tests/test_remoterepositories.py @@ -1,7 +1,6 @@ -from django.urls import reverse - -from allauth.socialaccount.models import SocialAccount import django_dynamic_fixture as fixture +from allauth.socialaccount.models import SocialAccount +from django.urls import reverse from readthedocs.oauth.constants import GITHUB from readthedocs.oauth.models import ( @@ -11,6 +10,7 @@ RemoteRepositoryRelation, ) from readthedocs.projects.constants import REPO_TYPE_GIT + from .mixins import APIEndpointMixin diff --git a/readthedocs/audit/apps.py b/readthedocs/audit/apps.py index 67ede210505..c892896742f 100644 --- a/readthedocs/audit/apps.py +++ b/readthedocs/audit/apps.py @@ -1,7 +1,6 @@ """Audit module.""" import structlog - from django.apps import AppConfig log = structlog.get_logger(__name__) diff --git a/readthedocs/audit/signals.py b/readthedocs/audit/signals.py index c38086bef5a..f1396c18051 100644 --- a/readthedocs/audit/signals.py +++ b/readthedocs/audit/signals.py @@ -6,8 +6,8 @@ user_logged_out, user_login_failed, ) -from django.dispatch import receiver from django.db.models import Q +from django.dispatch import receiver from readthedocs.audit.models import AuditLog diff --git a/readthedocs/builds/signals.py b/readthedocs/builds/signals.py index f14f2a93a39..f28c9742d27 100644 --- a/readthedocs/builds/signals.py +++ b/readthedocs/builds/signals.py @@ -2,7 +2,6 @@ import django.dispatch - build_complete = django.dispatch.Signal() # Useful to know when to purge the footer version_changed = django.dispatch.Signal() diff --git a/readthedocs/builds/urls.py b/readthedocs/builds/urls.py index b385ccc256d..29448ab0c10 100644 --- a/readthedocs/builds/urls.py +++ b/readthedocs/builds/urls.py @@ -3,7 +3,6 @@ from django.urls import re_path from django.views.generic.base import RedirectView - urlpatterns = [ re_path( r"^(?P[-\w]+)/(?P\d+)/$", diff --git a/readthedocs/core/history.py b/readthedocs/core/history.py index b77661403a4..fbf1ab0dda8 100644 --- a/readthedocs/core/history.py +++ b/readthedocs/core/history.py @@ -1,6 +1,6 @@ -import structlog from functools import partial +import structlog from django import forms from django.db import models from django.utils.translation import gettext_lazy as _ diff --git a/readthedocs/core/management/commands/collectstatic.py b/readthedocs/core/management/commands/collectstatic.py index d00d006ddc8..fde0f2e0994 100644 --- a/readthedocs/core/management/commands/collectstatic.py +++ b/readthedocs/core/management/commands/collectstatic.py @@ -5,7 +5,8 @@ """ from django.contrib.staticfiles.management.commands import collectstatic -from readthedocs.core.signals import pre_collectstatic, post_collectstatic + +from readthedocs.core.signals import post_collectstatic, pre_collectstatic class Command(collectstatic.Command): diff --git a/readthedocs/core/utils/contact.py b/readthedocs/core/utils/contact.py index 3fd20c4a5f1..cc5cc6be6df 100644 --- a/readthedocs/core/utils/contact.py +++ b/readthedocs/core/utils/contact.py @@ -1,11 +1,9 @@ -import structlog - import markdown +import structlog from django.conf import settings from django.core.mail import send_mail from django.template import Context, Engine - log = structlog.get_logger(__name__) diff --git a/readthedocs/doc_builder/loader.py b/readthedocs/doc_builder/loader.py index f5d9e5bda7a..9df5be3e957 100644 --- a/readthedocs/doc_builder/loader.py +++ b/readthedocs/doc_builder/loader.py @@ -3,7 +3,6 @@ from django.conf import settings - # Managers mkdocs = import_module(settings.MKDOCS_BACKEND) sphinx = import_module(settings.SPHINX_BACKEND) diff --git a/readthedocs/embed/v3/tests/conftest.py b/readthedocs/embed/v3/tests/conftest.py index 430e19a4538..0ecd850b7f2 100644 --- a/readthedocs/embed/v3/tests/conftest.py +++ b/readthedocs/embed/v3/tests/conftest.py @@ -1,5 +1,6 @@ import os import shutil + import pytest from .utils import srcdir diff --git a/readthedocs/oauth/management/commands/reconnect_remoterepositories.py b/readthedocs/oauth/management/commands/reconnect_remoterepositories.py index b8bd9c523aa..20db166bfb8 100644 --- a/readthedocs/oauth/management/commands/reconnect_remoterepositories.py +++ b/readthedocs/oauth/management/commands/reconnect_remoterepositories.py @@ -1,13 +1,13 @@ import json -from django.db.models import Q, Subquery from django.core.management.base import BaseCommand +from django.db.models import Q, Subquery from readthedocs.oauth.models import RemoteRepository from readthedocs.oauth.services import registry from readthedocs.oauth.services.base import SyncServiceError -from readthedocs.projects.models import Project from readthedocs.organizations.models import Organization +from readthedocs.projects.models import Project class Command(BaseCommand): diff --git a/readthedocs/oauth/management/commands/sync_vcs_data.py b/readthedocs/oauth/management/commands/sync_vcs_data.py index 9151f654791..6543ed4de37 100644 --- a/readthedocs/oauth/management/commands/sync_vcs_data.py +++ b/readthedocs/oauth/management/commands/sync_vcs_data.py @@ -1,9 +1,9 @@ import datetime import json -from django.utils import timezone from django.contrib.auth.models import User from django.core.management.base import BaseCommand +from django.utils import timezone from readthedocs.oauth.tasks import sync_remote_repositories diff --git a/readthedocs/organizations/tasks.py b/readthedocs/organizations/tasks.py index f120568163f..1bba399d530 100644 --- a/readthedocs/organizations/tasks.py +++ b/readthedocs/organizations/tasks.py @@ -5,7 +5,6 @@ from readthedocs.builds.models import Build from readthedocs.worker import app - log = structlog.get_logger(__name__) diff --git a/readthedocs/profiles/urls/public.py b/readthedocs/profiles/urls/public.py index 83c9b1e613e..62ca2806102 100644 --- a/readthedocs/profiles/urls/public.py +++ b/readthedocs/profiles/urls/public.py @@ -4,7 +4,6 @@ from readthedocs.profiles import views - urlpatterns = [ re_path( r"^(?P[+\w@.-]+)/$", diff --git a/readthedocs/projects/static-src/projects/css/admin.less b/readthedocs/projects/static-src/projects/css/admin.less index bdbe0d0747d..62815dcbbac 100644 --- a/readthedocs/projects/static-src/projects/css/admin.less +++ b/readthedocs/projects/static-src/projects/css/admin.less @@ -48,4 +48,4 @@ } } -} \ No newline at end of file +} diff --git a/readthedocs/projects/tag_utils.py b/readthedocs/projects/tag_utils.py index 0f011712765..cf45f2cb0fc 100644 --- a/readthedocs/projects/tag_utils.py +++ b/readthedocs/projects/tag_utils.py @@ -1,8 +1,8 @@ """Customizations to Django Taggit.""" +import requests from allauth.socialaccount.models import SocialApp from django.db.models import Count from django.utils.text import slugify -import requests from taggit.models import Tag from taggit.utils import _parse_tags diff --git a/readthedocs/rtd_tests/base.py b/readthedocs/rtd_tests/base.py index f742c16ae5e..c01b8a3e780 100644 --- a/readthedocs/rtd_tests/base.py +++ b/readthedocs/rtd_tests/base.py @@ -1,8 +1,8 @@ """Base classes and mixins for unit tests.""" -import structlog from collections import OrderedDict from unittest.mock import patch +import structlog from django.contrib.auth.models import AnonymousUser from django.contrib.messages.storage.fallback import FallbackStorage from django.contrib.sessions.middleware import SessionMiddleware diff --git a/readthedocs/rtd_tests/files/conf.py b/readthedocs/rtd_tests/files/conf.py index b4df3e2dce2..0dd951021ac 100644 --- a/readthedocs/rtd_tests/files/conf.py +++ b/readthedocs/rtd_tests/files/conf.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import division, print_function, unicode_literals - from datetime import datetime from recommonmark.parser import CommonMarkParser diff --git a/readthedocs/rtd_tests/tests/test_api_permissions.py b/readthedocs/rtd_tests/tests/test_api_permissions.py index f72ddc77ff9..0e5698ee34a 100644 --- a/readthedocs/rtd_tests/tests/test_api_permissions.py +++ b/readthedocs/rtd_tests/tests/test_api_permissions.py @@ -1,6 +1,5 @@ from functools import partial from unittest import TestCase - from unittest.mock import Mock from readthedocs.api.v2.permissions import ReadOnlyPermission diff --git a/readthedocs/search/models.py b/readthedocs/search/models.py index f0c59fd2382..30844629d96 100644 --- a/readthedocs/search/models.py +++ b/readthedocs/search/models.py @@ -5,7 +5,6 @@ from django.db.models.functions import TruncDate from django.utils import timezone from django.utils.translation import gettext_lazy as _ - from django_extensions.db.models import TimeStampedModel from readthedocs.builds.models import Version diff --git a/readthedocs/search/tasks.py b/readthedocs/search/tasks.py index 0d93473eeab..bfcd1239d8f 100644 --- a/readthedocs/search/tasks.py +++ b/readthedocs/search/tasks.py @@ -1,5 +1,4 @@ import structlog - from dateutil.parser import parse from django.apps import apps from django.conf import settings diff --git a/readthedocs/search/tests/test_search_tasks.py b/readthedocs/search/tests/test_search_tasks.py index e5ee51327e4..e8816a2273e 100644 --- a/readthedocs/search/tests/test_search_tasks.py +++ b/readthedocs/search/tests/test_search_tasks.py @@ -1,13 +1,13 @@ """Tests for search tasks.""" from unittest import mock -import pytest +import pytest from django.urls import reverse from django.utils import timezone -from readthedocs.search.models import SearchQuery from readthedocs.search import tasks +from readthedocs.search.models import SearchQuery @pytest.mark.django_db diff --git a/readthedocs/sso/admin.py b/readthedocs/sso/admin.py index 27fb9a996f5..28f42b8c990 100644 --- a/readthedocs/sso/admin.py +++ b/readthedocs/sso/admin.py @@ -1,6 +1,5 @@ """Admin interface for SSO models.""" import structlog - from django.contrib import admin, messages from readthedocs.core.permissions import AdminPermission @@ -8,7 +7,6 @@ from .models import SSODomain, SSOIntegration - log = structlog.get_logger(__name__) diff --git a/setup.py b/setup.py index 443d59b9836..be5b040dd00 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ from setuptools import setup - # Configuration is in setup.cfg setup()