|
17 | 17 | from django.utils.crypto import get_random_string
|
18 | 18 | from django.utils.functional import cached_property
|
19 | 19 | 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) |
21 | 22 | from django_extensions.db.models import TimeStampedModel
|
22 | 23 | from taggit.managers import TaggableManager
|
23 | 24 |
|
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) |
33 | 28 | from readthedocs.core.history import ExtraHistoricalRecords
|
34 | 29 | from readthedocs.core.resolver import Resolver
|
35 | 30 | from readthedocs.core.utils import extract_valid_attributes_for_model, slugify
|
36 | 31 | from readthedocs.core.utils.url import unsafe_join_url_path
|
| 32 | +from readthedocs.doc_builder.exceptions import MkDocsYAMLParseError |
37 | 33 | from readthedocs.domains.querysets import DomainQueryset
|
38 | 34 | from readthedocs.domains.validators import check_domains_limit
|
39 | 35 | from readthedocs.notifications.models import Notification as NewNotification
|
40 | 36 | from readthedocs.projects import constants
|
41 | 37 | from readthedocs.projects.exceptions import ProjectConfigurationError
|
42 |
| -from readthedocs.doc_builder.exceptions import MkDocsYAMLParseError |
43 | 38 | 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) |
50 | 42 | 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) |
59 | 47 | from readthedocs.projects.version_handling import determine_stable_version
|
60 | 48 | from readthedocs.search.parsers import GenericParser
|
61 | 49 | from readthedocs.storage import build_media_storage
|
62 | 50 | from readthedocs.vcs_support.backends import backend_cls
|
63 | 51 |
|
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) |
74 | 58 |
|
75 | 59 | log = structlog.get_logger(__name__)
|
76 | 60 |
|
@@ -1383,7 +1367,8 @@ def show_advertising(self):
|
1383 | 1367 | return False
|
1384 | 1368 |
|
1385 | 1369 | 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 |
1387 | 1372 |
|
1388 | 1373 | return not is_show_ads_denied(self)
|
1389 | 1374 |
|
|
0 commit comments