Skip to content

Commit 188d2ba

Browse files
committed
fixed isort errors
1 parent b0488b6 commit 188d2ba

File tree

2 files changed

+23
-38
lines changed

2 files changed

+23
-38
lines changed

readthedocs/projects/models.py

Lines changed: 21 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,60 +17,44 @@
1717
from django.utils.crypto import get_random_string
1818
from django.utils.functional import cached_property
1919
from django.utils.translation import gettext_lazy as _
20-
from django_extensions.db.fields import CreationDateTimeField, ModificationDateTimeField
20+
from django_extensions.db.fields import (CreationDateTimeField,
21+
ModificationDateTimeField)
2122
from django_extensions.db.models import TimeStampedModel
2223
from taggit.managers import TaggableManager
2324

24-
from readthedocs.builds.constants import (
25-
BRANCH,
26-
EXTERNAL,
27-
INTERNAL,
28-
LATEST,
29-
LATEST_VERBOSE_NAME,
30-
STABLE,
31-
STABLE_VERBOSE_NAME,
32-
)
25+
from readthedocs.builds.constants import (BRANCH, EXTERNAL, INTERNAL, LATEST,
26+
LATEST_VERBOSE_NAME, STABLE,
27+
STABLE_VERBOSE_NAME)
3328
from readthedocs.core.history import ExtraHistoricalRecords
3429
from readthedocs.core.resolver import Resolver
3530
from readthedocs.core.utils import extract_valid_attributes_for_model, slugify
3631
from readthedocs.core.utils.url import unsafe_join_url_path
32+
from readthedocs.doc_builder.exceptions import MkDocsYAMLParseError
3733
from readthedocs.domains.querysets import DomainQueryset
3834
from readthedocs.domains.validators import check_domains_limit
3935
from readthedocs.notifications.models import Notification as NewNotification
4036
from readthedocs.projects import constants
4137
from readthedocs.projects.exceptions import ProjectConfigurationError
42-
from readthedocs.doc_builder.exceptions import MkDocsYAMLParseError
4338
from readthedocs.projects.managers import HTMLFileManager
44-
from readthedocs.projects.querysets import (
45-
ChildRelatedProjectQuerySet,
46-
FeatureQuerySet,
47-
ProjectQuerySet,
48-
RelatedProjectQuerySet,
49-
)
39+
from readthedocs.projects.querysets import (ChildRelatedProjectQuerySet,
40+
FeatureQuerySet, ProjectQuerySet,
41+
RelatedProjectQuerySet)
5042
from readthedocs.projects.validators import (
51-
validate_build_config_file,
52-
validate_custom_prefix,
53-
validate_custom_subproject_prefix,
54-
validate_domain_name,
55-
validate_environment_variable_size,
56-
validate_no_ip,
57-
validate_repository_url,
58-
)
43+
validate_build_config_file, validate_custom_prefix,
44+
validate_custom_subproject_prefix, validate_domain_name,
45+
validate_environment_variable_size, validate_no_ip,
46+
validate_repository_url)
5947
from readthedocs.projects.version_handling import determine_stable_version
6048
from readthedocs.search.parsers import GenericParser
6149
from readthedocs.storage import build_media_storage
6250
from readthedocs.vcs_support.backends import backend_cls
6351

64-
from .constants import (
65-
ADDONS_FLYOUT_POSITION_CHOICES,
66-
ADDONS_FLYOUT_SORTING_CHOICES,
67-
ADDONS_FLYOUT_SORTING_SEMVER_READTHEDOCS_COMPATIBLE,
68-
DOWNLOADABLE_MEDIA_TYPES,
69-
MEDIA_TYPES,
70-
MULTIPLE_VERSIONS_WITH_TRANSLATIONS,
71-
MULTIPLE_VERSIONS_WITHOUT_TRANSLATIONS,
72-
PUBLIC,
73-
)
52+
from .constants import (ADDONS_FLYOUT_POSITION_CHOICES,
53+
ADDONS_FLYOUT_SORTING_CHOICES,
54+
ADDONS_FLYOUT_SORTING_SEMVER_READTHEDOCS_COMPATIBLE,
55+
DOWNLOADABLE_MEDIA_TYPES, MEDIA_TYPES,
56+
MULTIPLE_VERSIONS_WITH_TRANSLATIONS,
57+
MULTIPLE_VERSIONS_WITHOUT_TRANSLATIONS, PUBLIC)
7458

7559
log = structlog.get_logger(__name__)
7660

@@ -1383,7 +1367,8 @@ def show_advertising(self):
13831367
return False
13841368

13851369
if "readthedocsext.spamfighting" in settings.INSTALLED_APPS:
1386-
from readthedocsext.spamfighting.utils import is_show_ads_denied # noqa
1370+
from readthedocsext.spamfighting.utils import \
1371+
is_show_ads_denied # noqa
13871372

13881373
return not is_show_ads_denied(self)
13891374

readthedocs/rtd_tests/tests/test_doc_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
from django.test.utils import override_settings
99

1010
from readthedocs.config.tests.test_config import get_build_config
11+
from readthedocs.doc_builder.backends.mkdocs import BaseMkdocs
1112
from readthedocs.doc_builder.backends.sphinx import BaseSphinx
13+
from readthedocs.doc_builder.exceptions import MkDocsYAMLParseError
1214
from readthedocs.doc_builder.python_environments import Virtualenv
1315
from readthedocs.projects.exceptions import ProjectConfigurationError
1416
from readthedocs.projects.models import Project
15-
from readthedocs.doc_builder.backends.mkdocs import BaseMkdocs
16-
from readthedocs.doc_builder.exceptions import MkDocsYAMLParseError
1717

1818

1919
@override_settings(PRODUCTION_DOMAIN="readthedocs.org")

0 commit comments

Comments
 (0)