From 43d703d5a6467d7e67fd8e1355c72dd1b05a6ab1 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 8 Mar 2023 20:47:34 +0100 Subject: [PATCH 01/13] Lint: trailing lines and whitespaces --- .github/config.yml | 1 - LICENSE | 1 - docs/dev/design/new-sphinx-guides.rst | 2 +- docs/dev/design/organizations.rst | 2 +- docs/dev/design/sphinx-jquery.rst | 2 +- docs/user/.tx/config | 1 - media/robots.txt | 2 +- readthedocs/rtd_tests/files/api/index.html | 2 +- readthedocs/rtd_tests/files/test.html | 2 +- readthedocs/templates/projects/integration_webhook_detail.html | 2 +- 10 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/config.yml b/.github/config.yml index 3575f85609e..638249e329d 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -6,4 +6,3 @@ todo: blobLines: 7 caseSensitive: true keyword: "TODO" - diff --git a/LICENSE b/LICENSE index c72390a362b..f0c719d91db 100644 --- a/LICENSE +++ b/LICENSE @@ -20,4 +20,3 @@ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/docs/dev/design/new-sphinx-guides.rst b/docs/dev/design/new-sphinx-guides.rst index 71ed2566116..ac42922ef60 100644 --- a/docs/dev/design/new-sphinx-guides.rst +++ b/docs/dev/design/new-sphinx-guides.rst @@ -146,7 +146,7 @@ highly recommended. compilations of themes and extensions, the development documentation. -.. note +.. note - Looks like MathJax is enabled by default now? Can't see a reference in the docstrings diff --git a/docs/dev/design/organizations.rst b/docs/dev/design/organizations.rst index bfe8d47ce54..b158d3f9421 100644 --- a/docs/dev/design/organizations.rst +++ b/docs/dev/design/organizations.rst @@ -27,7 +27,7 @@ How are we going to support organizations? ------------------------------------------ Currently only users can own projects in the community site. -With organizations this is going to change to: +With organizations this is going to change to: Users and organizations can own projects. With this, the migration process would be straightforward for the community site. diff --git a/docs/dev/design/sphinx-jquery.rst b/docs/dev/design/sphinx-jquery.rst index ba2023fef2d..73d98283d17 100644 --- a/docs/dev/design/sphinx-jquery.rst +++ b/docs/dev/design/sphinx-jquery.rst @@ -110,7 +110,7 @@ The minified jQuery JS file is ultimately included by calling `app.add_js_file < get_jquery_url_path(), loading_method="defer", priority=200, - integrity="sha256-{}".format(get_jquery_sha256_checksum()) + integrity="sha256-{}".format(get_jquery_sha256_checksum()), ) diff --git a/docs/user/.tx/config b/docs/user/.tx/config index 1ad0d7c06b1..e39f021a040 100644 --- a/docs/user/.tx/config +++ b/docs/user/.tx/config @@ -426,4 +426,3 @@ file_filter = locale//LC_MESSAGES/settings.po source_file = _build/locale/settings.pot source_lang = en type = PO - diff --git a/media/robots.txt b/media/robots.txt index c20e174afb9..1984299927b 100644 --- a/media/robots.txt +++ b/media/robots.txt @@ -5,5 +5,5 @@ Disallow: /builds/ Disallow: /sustainability/click/ # This was hitting our site and causing a lot of issues -User-agent: AhrefsBot +User-agent: AhrefsBot Disallow: / diff --git a/readthedocs/rtd_tests/files/api/index.html b/readthedocs/rtd_tests/files/api/index.html index 8318c86b357..345e6aef713 100644 --- a/readthedocs/rtd_tests/files/api/index.html +++ b/readthedocs/rtd_tests/files/api/index.html @@ -1 +1 @@ -Test \ No newline at end of file +Test diff --git a/readthedocs/rtd_tests/files/test.html b/readthedocs/rtd_tests/files/test.html index 0aeac33d5b1..a7b1555f981 100644 --- a/readthedocs/rtd_tests/files/test.html +++ b/readthedocs/rtd_tests/files/test.html @@ -1 +1 @@ -Something Else \ No newline at end of file +Something Else diff --git a/readthedocs/templates/projects/integration_webhook_detail.html b/readthedocs/templates/projects/integration_webhook_detail.html index 4fdebcd4090..3fd3c571e26 100644 --- a/readthedocs/templates/projects/integration_webhook_detail.html +++ b/readthedocs/templates/projects/integration_webhook_detail.html @@ -19,7 +19,7 @@ {% if integration.has_sync and integration.can_sync %}

{% blocktrans trimmed %} - This integration is being managed automatically by Read the Docs. If + This integration is being managed automatically by Read the Docs. If it isn't functioning correctly, try re-syncing the webhook: {% endblocktrans %}

From 672a286093175db316ead4c7274bc90d491f8ddf Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 8 Mar 2023 20:49:44 +0100 Subject: [PATCH 02/13] Lint: remove outdated encoding pragma --- readthedocs/builds/migrations/0001_initial.py | 1 - readthedocs/builds/migrations/0002_build_command_initial.py | 1 - readthedocs/builds/migrations/0003_add-cold-storage.py | 1 - readthedocs/builds/migrations/0004_add-apiversion-proxy-model.py | 1 - readthedocs/builds/migrations/0005_remove-version-alias.py | 1 - readthedocs/builds/migrations/0006_add_config_field.py | 1 - readthedocs/builds/migrations/0007_add-automation-rules.py | 1 - readthedocs/builds/migrations/0008_remove-version-tags.py | 1 - .../builds/migrations/0009_added_external_version_type.py | 1 - .../migrations/0010_add-description-field-to-automation-rule.py | 1 - readthedocs/builds/migrations/0011_version-media-availability.py | 1 - .../builds/migrations/0012_add-predefined-match-arg-field.py | 1 - readthedocs/builds/migrations/0013_version_documentation_type.py | 1 - .../migrations/0014_migrate-doctype-from-project-to-version.py | 1 - readthedocs/builds/version_slug.py | 1 - readthedocs/config/__init__.py | 1 - readthedocs/config/find.py | 1 - readthedocs/config/parser.py | 1 - readthedocs/config/tests/test_find.py | 1 - readthedocs/config/tests/test_parser.py | 1 - readthedocs/config/tests/test_utils.py | 1 - readthedocs/config/tests/utils.py | 1 - readthedocs/core/backends.py | 1 - readthedocs/core/context_processors.py | 1 - readthedocs/core/fields.py | 1 - readthedocs/core/migrations/0001_initial.py | 1 - .../migrations/0002_make_userprofile_user_a_onetoonefield.py | 1 - readthedocs/core/migrations/0003_add_banned_status.py | 1 - readthedocs/core/migrations/0004_ad-opt-out.py | 1 - readthedocs/core/migrations/0005_migrate-old-passwords.py | 1 - .../core/migrations/0006_remove_userprofile_allow_email.py | 1 - readthedocs/core/static.py | 1 - readthedocs/core/utils/extend.py | 1 - readthedocs/doc_builder/signals.py | 1 - readthedocs/gold/admin.py | 1 - readthedocs/gold/apps.py | 1 - readthedocs/gold/forms.py | 1 - readthedocs/gold/migrations/0001_initial.py | 1 - readthedocs/gold/migrations/0002_rename_last_4_digits.py | 1 - .../gold/migrations/0003_add_missing_model_change_migrations.py | 1 - readthedocs/gold/migrations/0004_add_vat_id.py | 1 - readthedocs/gold/tests/test_signals.py | 1 - readthedocs/gold/urls.py | 1 - readthedocs/integrations/admin.py | 1 - readthedocs/integrations/migrations/0001_add_http_exchange.py | 1 - readthedocs/integrations/migrations/0002_add-webhook.py | 1 - .../migrations/0003_add_missing_model_change_migrations.py | 1 - .../integrations/migrations/0004_add_integration_secret.py | 1 - .../migrations/0005_change_default_integration_secret.py | 1 - .../migrations/0006_set-default-value-provider-data.py | 1 - readthedocs/integrations/migrations/0007_update-provider-data.py | 1 - readthedocs/notifications/apps.py | 1 - readthedocs/notifications/constants.py | 1 - readthedocs/notifications/forms.py | 1 - readthedocs/notifications/storages.py | 1 - readthedocs/notifications/views.py | 1 - readthedocs/oauth/admin.py | 1 - readthedocs/oauth/migrations/0001_initial.py | 1 - readthedocs/oauth/migrations/0002_combine_services.py | 1 - readthedocs/oauth/migrations/0003_move_github.py | 1 - .../oauth/migrations/0004_drop_github_and_bitbucket_models.py | 1 - readthedocs/oauth/migrations/0005_add_account_relation.py | 1 - readthedocs/oauth/migrations/0006_move_oauth_source.py | 1 - readthedocs/oauth/migrations/0007_org_slug_nonunique.py | 1 - readthedocs/oauth/migrations/0008_add-project-relation.py | 1 - .../oauth/migrations/0009_add_missing_model_change_migrations.py | 1 - readthedocs/oauth/services/__init__.py | 1 - readthedocs/payments/mixins.py | 1 - readthedocs/projects/backends/views.py | 1 - readthedocs/projects/migrations/0001_initial.py | 1 - readthedocs/projects/migrations/0002_add_importedfile_model.py | 1 - readthedocs/projects/migrations/0003_project_cdn_enabled.py | 1 - .../projects/migrations/0004_add_project_container_image.py | 1 - readthedocs/projects/migrations/0005_sync_project_model.py | 1 - readthedocs/projects/migrations/0006_add_domain_models.py | 1 - readthedocs/projects/migrations/0007_migrate_canonical_data.py | 1 - .../projects/migrations/0008_add_subproject_alias_prefix.py | 1 - readthedocs/projects/migrations/0009_add_domain_field.py | 1 - readthedocs/projects/migrations/0010_migrate_domain_data.py | 1 - readthedocs/projects/migrations/0011_delete-url.py | 1 - .../projects/migrations/0012_proper-name-for-install-project.py | 1 - readthedocs/projects/migrations/0013_add-container-limits.py | 1 - readthedocs/projects/migrations/0014_add-state-tracking.py | 1 - readthedocs/projects/migrations/0015_add_project_allow_promos.py | 1 - readthedocs/projects/migrations/0016_build-queue-name.py | 1 - readthedocs/projects/migrations/0017_add_domain_https.py | 1 - readthedocs/projects/migrations/0018_fix-translation-model.py | 1 - readthedocs/projects/migrations/0019_add-features.py | 1 - readthedocs/projects/migrations/0020_add-api-project-proxy.py | 1 - .../projects/migrations/0021_add-webhook-deprecation-feature.py | 1 - readthedocs/projects/migrations/0022_add-alias-slug.py | 1 - readthedocs/projects/migrations/0023_migrate-alias-slug.py | 1 - readthedocs/projects/migrations/0024_add-show-version-warning.py | 1 - .../migrations/0025_show-version-warning-existing-projects.py | 1 - readthedocs/projects/migrations/0026_ad-free-option.py | 1 - .../projects/migrations/0027_remove_json_with_html_feature.py | 1 - .../migrations/0028_remove_comments_and_update_old_migration.py | 1 - readthedocs/projects/migrations/0029_add_additional_languages.py | 1 - .../projects/migrations/0030_change-max-length-project-slug.py | 1 - .../projects/migrations/0031_add_modified_date_importedfile.py | 1 - readthedocs/projects/migrations/0032_increase_webhook_maxsize.py | 1 - .../projects/migrations/0033_add_environment_variables.py | 1 - .../migrations/0034_remove_unused_project_model_fields.py | 1 - .../projects/migrations/0035_container_time_limit_as_integer.py | 1 - readthedocs/projects/migrations/0036_remove-auto-doctype.py | 1 - readthedocs/projects/migrations/0037_add_htmlfile.py | 1 - .../migrations/0038_change-default-python-interpreter.py | 1 - readthedocs/projects/migrations/0039_update-doctype-helptext.py | 1 - readthedocs/projects/migrations/0040_increase_path_max_length.py | 1 - readthedocs/projects/migrations/0041_index-repo-field.py | 1 - .../migrations/0042_increase_env_variable_value_max_length.py | 1 - readthedocs/projects/migrations/0043_add-build-field.py | 1 - readthedocs/projects/migrations/0044_auto_20190703_1300.py | 1 - readthedocs/projects/migrations/0071_add_env_var_privacy.py | 1 - readthedocs/projects/notifications.py | 1 - readthedocs/redirects/admin.py | 1 - readthedocs/redirects/migrations/0001_initial.py | 1 - .../migrations/0002_add_missing_model_change_migrations.py | 1 - .../migrations/0003_add_default_redirect_http_status_to_302.py | 1 - readthedocs/redirects/migrations/0004_denormalize-from-url.py | 1 - readthedocs/rtd_tests/files/conf.py | 1 - readthedocs/rtd_tests/fixtures/sample_repo/source/conf.py | 1 - readthedocs/rtd_tests/mocks/paths.py | 1 - readthedocs/rtd_tests/tests/projects/test_admin_actions.py | 1 - readthedocs/rtd_tests/tests/test_backend_svn.py | 1 - readthedocs/rtd_tests/tests/test_build_config.py | 1 - readthedocs/rtd_tests/tests/test_extend.py | 1 - readthedocs/rtd_tests/tests/test_single_version.py | 1 - readthedocs/rtd_tests/tests/test_version_commit_name.py | 1 - readthedocs/rtd_tests/tests/test_version_slug.py | 1 - readthedocs/search/migrations/0001_initial.py | 1 - readthedocs/sphinx_domains/migrations/0001_initial.py | 1 - .../sphinx_domains/migrations/0002_increase_max_length.py | 1 - .../sphinx_domains/migrations/0003_additional_indexed_fields.py | 1 - readthedocs/sphinx_domains/migrations/0004_add-build-field.py | 1 - .../migrations/0005_htmlfile-sphinx-domain-integration.py | 1 - 136 files changed, 136 deletions(-) diff --git a/readthedocs/builds/migrations/0001_initial.py b/readthedocs/builds/migrations/0001_initial.py index 4418a4dc7a0..aa960365cd6 100644 --- a/readthedocs/builds/migrations/0001_initial.py +++ b/readthedocs/builds/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import taggit.managers from django.db import migrations, models diff --git a/readthedocs/builds/migrations/0002_build_command_initial.py b/readthedocs/builds/migrations/0002_build_command_initial.py index 3da213dcecc..823ad754141 100644 --- a/readthedocs/builds/migrations/0002_build_command_initial.py +++ b/readthedocs/builds/migrations/0002_build_command_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models import readthedocs.builds.models diff --git a/readthedocs/builds/migrations/0003_add-cold-storage.py b/readthedocs/builds/migrations/0003_add-cold-storage.py index 2c53cc144dd..3d21b40fbed 100644 --- a/readthedocs/builds/migrations/0003_add-cold-storage.py +++ b/readthedocs/builds/migrations/0003_add-cold-storage.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-10-09 20:14 from django.db import migrations, models diff --git a/readthedocs/builds/migrations/0004_add-apiversion-proxy-model.py b/readthedocs/builds/migrations/0004_add-apiversion-proxy-model.py index 8247d9a0249..e032e4432bd 100644 --- a/readthedocs/builds/migrations/0004_add-apiversion-proxy-model.py +++ b/readthedocs/builds/migrations/0004_add-apiversion-proxy-model.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-10-27 00:17 from django.db import migrations diff --git a/readthedocs/builds/migrations/0005_remove-version-alias.py b/readthedocs/builds/migrations/0005_remove-version-alias.py index 65f6aadd3a5..9c5b137b835 100644 --- a/readthedocs/builds/migrations/0005_remove-version-alias.py +++ b/readthedocs/builds/migrations/0005_remove-version-alias.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-10-17 04:20 from django.db import migrations, models diff --git a/readthedocs/builds/migrations/0006_add_config_field.py b/readthedocs/builds/migrations/0006_add_config_field.py index deb3700278c..f8b8769de09 100644 --- a/readthedocs/builds/migrations/0006_add_config_field.py +++ b/readthedocs/builds/migrations/0006_add_config_field.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-02 13:24 import jsonfield.fields from django.db import migrations diff --git a/readthedocs/builds/migrations/0007_add-automation-rules.py b/readthedocs/builds/migrations/0007_add-automation-rules.py index 0a4795f8bd5..9b44c04312c 100644 --- a/readthedocs/builds/migrations/0007_add-automation-rules.py +++ b/readthedocs/builds/migrations/0007_add-automation-rules.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-25 23:04 from __future__ import unicode_literals diff --git a/readthedocs/builds/migrations/0008_remove-version-tags.py b/readthedocs/builds/migrations/0008_remove-version-tags.py index 991c12250e8..8778927553c 100644 --- a/readthedocs/builds/migrations/0008_remove-version-tags.py +++ b/readthedocs/builds/migrations/0008_remove-version-tags.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-06-28 16:29 from __future__ import unicode_literals diff --git a/readthedocs/builds/migrations/0009_added_external_version_type.py b/readthedocs/builds/migrations/0009_added_external_version_type.py index ece2f2fb25c..482969209ac 100644 --- a/readthedocs/builds/migrations/0009_added_external_version_type.py +++ b/readthedocs/builds/migrations/0009_added_external_version_type.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-07-04 13:10 from __future__ import unicode_literals diff --git a/readthedocs/builds/migrations/0010_add-description-field-to-automation-rule.py b/readthedocs/builds/migrations/0010_add-description-field-to-automation-rule.py index 51b9bc77e51..7779271a901 100644 --- a/readthedocs/builds/migrations/0010_add-description-field-to-automation-rule.py +++ b/readthedocs/builds/migrations/0010_add-description-field-to-automation-rule.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-07-25 17:24 from __future__ import unicode_literals diff --git a/readthedocs/builds/migrations/0011_version-media-availability.py b/readthedocs/builds/migrations/0011_version-media-availability.py index 5f9825e09fe..6b86139e516 100644 --- a/readthedocs/builds/migrations/0011_version-media-availability.py +++ b/readthedocs/builds/migrations/0011_version-media-availability.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-10-07 23:32 from __future__ import unicode_literals diff --git a/readthedocs/builds/migrations/0012_add-predefined-match-arg-field.py b/readthedocs/builds/migrations/0012_add-predefined-match-arg-field.py index 6b57b553ca0..0e1d4279b83 100644 --- a/readthedocs/builds/migrations/0012_add-predefined-match-arg-field.py +++ b/readthedocs/builds/migrations/0012_add-predefined-match-arg-field.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.25 on 2019-11-05 23:54 from __future__ import unicode_literals diff --git a/readthedocs/builds/migrations/0013_version_documentation_type.py b/readthedocs/builds/migrations/0013_version_documentation_type.py index 7c9d514b873..53f0abd569d 100644 --- a/readthedocs/builds/migrations/0013_version_documentation_type.py +++ b/readthedocs/builds/migrations/0013_version_documentation_type.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.27 on 2020-01-14 17:37 from __future__ import unicode_literals diff --git a/readthedocs/builds/migrations/0014_migrate-doctype-from-project-to-version.py b/readthedocs/builds/migrations/0014_migrate-doctype-from-project-to-version.py index 4dbca204fdf..08446cf31d7 100644 --- a/readthedocs/builds/migrations/0014_migrate-doctype-from-project-to-version.py +++ b/readthedocs/builds/migrations/0014_migrate-doctype-from-project-to-version.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.27 on 2020-01-14 17:40 from django.db import migrations diff --git a/readthedocs/builds/version_slug.py b/readthedocs/builds/version_slug.py index e363e30281a..751a9a6fedc 100644 --- a/readthedocs/builds/version_slug.py +++ b/readthedocs/builds/version_slug.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Contains logic for handling version slugs. diff --git a/readthedocs/config/__init__.py b/readthedocs/config/__init__.py index 23006b4c46e..8bf3d991ce4 100644 --- a/readthedocs/config/__init__.py +++ b/readthedocs/config/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Logic to parse and validate ``readthedocs.yaml`` file.""" from .config import * # noqa diff --git a/readthedocs/config/find.py b/readthedocs/config/find.py index 2fe5292c45e..93cd5849bc5 100644 --- a/readthedocs/config/find.py +++ b/readthedocs/config/find.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Helper functions to search files.""" diff --git a/readthedocs/config/parser.py b/readthedocs/config/parser.py index df30d8f51d2..fbc58ee5218 100644 --- a/readthedocs/config/parser.py +++ b/readthedocs/config/parser.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """YAML parser for the RTD configuration file.""" diff --git a/readthedocs/config/tests/test_find.py b/readthedocs/config/tests/test_find.py index ab813cdb6a5..b982245fb71 100644 --- a/readthedocs/config/tests/test_find.py +++ b/readthedocs/config/tests/test_find.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import os from readthedocs.config.find import find_one diff --git a/readthedocs/config/tests/test_parser.py b/readthedocs/config/tests/test_parser.py index 64a7e1f7292..d7a7b9462d4 100644 --- a/readthedocs/config/tests/test_parser.py +++ b/readthedocs/config/tests/test_parser.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from io import StringIO from pytest import raises diff --git a/readthedocs/config/tests/test_utils.py b/readthedocs/config/tests/test_utils.py index 3d4b57254e3..04f0192763d 100644 --- a/readthedocs/config/tests/test_utils.py +++ b/readthedocs/config/tests/test_utils.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from .utils import apply_fs diff --git a/readthedocs/config/tests/utils.py b/readthedocs/config/tests/utils.py index 4dd6a53313c..fb032e411a2 100644 --- a/readthedocs/config/tests/utils.py +++ b/readthedocs/config/tests/utils.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- def apply_fs(tmpdir, contents): """ diff --git a/readthedocs/core/backends.py b/readthedocs/core/backends.py index b7f9bf788a7..64c6331dd02 100644 --- a/readthedocs/core/backends.py +++ b/readthedocs/core/backends.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Email backends for core app.""" diff --git a/readthedocs/core/context_processors.py b/readthedocs/core/context_processors.py index 77d4f874b64..59a32f8e566 100644 --- a/readthedocs/core/context_processors.py +++ b/readthedocs/core/context_processors.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Template context processors for core app.""" diff --git a/readthedocs/core/fields.py b/readthedocs/core/fields.py index 5801d30146b..c4c3baead29 100644 --- a/readthedocs/core/fields.py +++ b/readthedocs/core/fields.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Shared model fields and defaults.""" diff --git a/readthedocs/core/migrations/0001_initial.py b/readthedocs/core/migrations/0001_initial.py index a97ef95762a..a80526dcfe9 100644 --- a/readthedocs/core/migrations/0001_initial.py +++ b/readthedocs/core/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.conf import settings from django.db import migrations, models diff --git a/readthedocs/core/migrations/0002_make_userprofile_user_a_onetoonefield.py b/readthedocs/core/migrations/0002_make_userprofile_user_a_onetoonefield.py index 853624c76c8..1b4596d51d6 100644 --- a/readthedocs/core/migrations/0002_make_userprofile_user_a_onetoonefield.py +++ b/readthedocs/core/migrations/0002_make_userprofile_user_a_onetoonefield.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.conf import settings from django.db import migrations, models diff --git a/readthedocs/core/migrations/0003_add_banned_status.py b/readthedocs/core/migrations/0003_add_banned_status.py index 95d26eefc42..9c297b99295 100644 --- a/readthedocs/core/migrations/0003_add_banned_status.py +++ b/readthedocs/core/migrations/0003_add_banned_status.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/core/migrations/0004_ad-opt-out.py b/readthedocs/core/migrations/0004_ad-opt-out.py index f5d6ae3d029..9a667e6c57e 100644 --- a/readthedocs/core/migrations/0004_ad-opt-out.py +++ b/readthedocs/core/migrations/0004_ad-opt-out.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-06-14 18:06 import annoying.fields import django.db.models.deletion diff --git a/readthedocs/core/migrations/0005_migrate-old-passwords.py b/readthedocs/core/migrations/0005_migrate-old-passwords.py index 8a44107c90b..6c8b7313bfc 100644 --- a/readthedocs/core/migrations/0005_migrate-old-passwords.py +++ b/readthedocs/core/migrations/0005_migrate-old-passwords.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-11 17:28 from django.contrib.auth.hashers import make_password from django.db import migrations diff --git a/readthedocs/core/migrations/0006_remove_userprofile_allow_email.py b/readthedocs/core/migrations/0006_remove_userprofile_allow_email.py index 0a4c6c8fb47..e82989e41f4 100644 --- a/readthedocs/core/migrations/0006_remove_userprofile_allow_email.py +++ b/readthedocs/core/migrations/0006_remove_userprofile_allow_email.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-01 17:30 from __future__ import unicode_literals diff --git a/readthedocs/core/static.py b/readthedocs/core/static.py index 71d433b259c..e1fb22afcd9 100644 --- a/readthedocs/core/static.py +++ b/readthedocs/core/static.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.contrib.staticfiles.finders import FileSystemFinder diff --git a/readthedocs/core/utils/extend.py b/readthedocs/core/utils/extend.py index 3348856eaf1..a422fdebd0d 100644 --- a/readthedocs/core/utils/extend.py +++ b/readthedocs/core/utils/extend.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Patterns for extending Read the Docs.""" diff --git a/readthedocs/doc_builder/signals.py b/readthedocs/doc_builder/signals.py index 91922782a5f..3e064366962 100644 --- a/readthedocs/doc_builder/signals.py +++ b/readthedocs/doc_builder/signals.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Signals for adding custom context data.""" diff --git a/readthedocs/gold/admin.py b/readthedocs/gold/admin.py index 6d053139471..42d8a3f5c62 100644 --- a/readthedocs/gold/admin.py +++ b/readthedocs/gold/admin.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Django admin configuration for the Gold membership app.""" diff --git a/readthedocs/gold/apps.py b/readthedocs/gold/apps.py index c06206bd57a..abe8afa1e51 100644 --- a/readthedocs/gold/apps.py +++ b/readthedocs/gold/apps.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Django app configuration for the Gold membership app.""" diff --git a/readthedocs/gold/forms.py b/readthedocs/gold/forms.py index bc49604d413..070c64b6653 100644 --- a/readthedocs/gold/forms.py +++ b/readthedocs/gold/forms.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Gold subscription forms.""" diff --git a/readthedocs/gold/migrations/0001_initial.py b/readthedocs/gold/migrations/0001_initial.py index 3ac4542f0c7..010e2ab1a39 100644 --- a/readthedocs/gold/migrations/0001_initial.py +++ b/readthedocs/gold/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.conf import settings from django.db import migrations, models diff --git a/readthedocs/gold/migrations/0002_rename_last_4_digits.py b/readthedocs/gold/migrations/0002_rename_last_4_digits.py index 478681e4ad3..d0db0cfb76e 100644 --- a/readthedocs/gold/migrations/0002_rename_last_4_digits.py +++ b/readthedocs/gold/migrations/0002_rename_last_4_digits.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-07-16 15:45 from django.db import migrations diff --git a/readthedocs/gold/migrations/0003_add_missing_model_change_migrations.py b/readthedocs/gold/migrations/0003_add_missing_model_change_migrations.py index f1f9f1dbd5f..f78359b599f 100644 --- a/readthedocs/gold/migrations/0003_add_missing_model_change_migrations.py +++ b/readthedocs/gold/migrations/0003_add_missing_model_change_migrations.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-31 11:25 from django.db import migrations, models diff --git a/readthedocs/gold/migrations/0004_add_vat_id.py b/readthedocs/gold/migrations/0004_add_vat_id.py index ee4899eebac..c15a9580011 100644 --- a/readthedocs/gold/migrations/0004_add_vat_id.py +++ b/readthedocs/gold/migrations/0004_add_vat_id.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-10-22 07:13 from django.db import migrations, models diff --git a/readthedocs/gold/tests/test_signals.py b/readthedocs/gold/tests/test_signals.py index 630ce2540c4..c2d406c4afc 100644 --- a/readthedocs/gold/tests/test_signals.py +++ b/readthedocs/gold/tests/test_signals.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import django_dynamic_fixture as fixture from unittest import mock from django.contrib.auth.models import User diff --git a/readthedocs/gold/urls.py b/readthedocs/gold/urls.py index 84b8551aa1f..2a02c58ee2c 100644 --- a/readthedocs/gold/urls.py +++ b/readthedocs/gold/urls.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Gold subscription URLs.""" diff --git a/readthedocs/integrations/admin.py b/readthedocs/integrations/admin.py index bc5f9478ef9..f4b9a32db13 100644 --- a/readthedocs/integrations/admin.py +++ b/readthedocs/integrations/admin.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Integration admin models.""" diff --git a/readthedocs/integrations/migrations/0001_add_http_exchange.py b/readthedocs/integrations/migrations/0001_add_http_exchange.py index c1ee6c0b714..45731e26537 100644 --- a/readthedocs/integrations/migrations/0001_add_http_exchange.py +++ b/readthedocs/integrations/migrations/0001_add_http_exchange.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-03-16 18:30 import uuid diff --git a/readthedocs/integrations/migrations/0002_add-webhook.py b/readthedocs/integrations/migrations/0002_add-webhook.py index e42ef2a8613..502d89caa9b 100644 --- a/readthedocs/integrations/migrations/0002_add-webhook.py +++ b/readthedocs/integrations/migrations/0002_add-webhook.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-03-29 21:29 import django.db.models.deletion import jsonfield.fields diff --git a/readthedocs/integrations/migrations/0003_add_missing_model_change_migrations.py b/readthedocs/integrations/migrations/0003_add_missing_model_change_migrations.py index d1a4314417d..75c716ead04 100644 --- a/readthedocs/integrations/migrations/0003_add_missing_model_change_migrations.py +++ b/readthedocs/integrations/migrations/0003_add_missing_model_change_migrations.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-31 11:25 from django.db import migrations, models diff --git a/readthedocs/integrations/migrations/0004_add_integration_secret.py b/readthedocs/integrations/migrations/0004_add_integration_secret.py index d8f78320b0b..eb3f2c98851 100644 --- a/readthedocs/integrations/migrations/0004_add_integration_secret.py +++ b/readthedocs/integrations/migrations/0004_add_integration_secret.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-12-10 21:28 from __future__ import unicode_literals diff --git a/readthedocs/integrations/migrations/0005_change_default_integration_secret.py b/readthedocs/integrations/migrations/0005_change_default_integration_secret.py index 9eabe0d7ea1..58246650ff2 100644 --- a/readthedocs/integrations/migrations/0005_change_default_integration_secret.py +++ b/readthedocs/integrations/migrations/0005_change_default_integration_secret.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-12-10 22:08 from __future__ import unicode_literals diff --git a/readthedocs/integrations/migrations/0006_set-default-value-provider-data.py b/readthedocs/integrations/migrations/0006_set-default-value-provider-data.py index 7452be6907a..84bfb270f2c 100644 --- a/readthedocs/integrations/migrations/0006_set-default-value-provider-data.py +++ b/readthedocs/integrations/migrations/0006_set-default-value-provider-data.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.27 on 2020-02-17 18:14 from __future__ import unicode_literals diff --git a/readthedocs/integrations/migrations/0007_update-provider-data.py b/readthedocs/integrations/migrations/0007_update-provider-data.py index f8c0dd90ff4..543ebcb7782 100644 --- a/readthedocs/integrations/migrations/0007_update-provider-data.py +++ b/readthedocs/integrations/migrations/0007_update-provider-data.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.27 on 2020-02-18 19:00 from __future__ import unicode_literals diff --git a/readthedocs/notifications/apps.py b/readthedocs/notifications/apps.py index 60543374e05..bdff08adda6 100644 --- a/readthedocs/notifications/apps.py +++ b/readthedocs/notifications/apps.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Django app configuration for the notifications app.""" from django.apps import AppConfig diff --git a/readthedocs/notifications/constants.py b/readthedocs/notifications/constants.py index 640170aff40..e930b3eba54 100644 --- a/readthedocs/notifications/constants.py +++ b/readthedocs/notifications/constants.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Notification constants.""" diff --git a/readthedocs/notifications/forms.py b/readthedocs/notifications/forms.py index bfcf9d06f0a..e21cdebea9f 100644 --- a/readthedocs/notifications/forms.py +++ b/readthedocs/notifications/forms.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """HTML forms for sending notifications.""" from django import forms diff --git a/readthedocs/notifications/storages.py b/readthedocs/notifications/storages.py index 31ee884d640..a78aeefdb8a 100644 --- a/readthedocs/notifications/storages.py +++ b/readthedocs/notifications/storages.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Customised storage for notifications.""" diff --git a/readthedocs/notifications/views.py b/readthedocs/notifications/views.py index e428472e476..b2b0a17ff34 100644 --- a/readthedocs/notifications/views.py +++ b/readthedocs/notifications/views.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Django views for the notifications app.""" from django.contrib import admin, messages diff --git a/readthedocs/oauth/admin.py b/readthedocs/oauth/admin.py index 81a790c8b40..17ab20903b9 100644 --- a/readthedocs/oauth/admin.py +++ b/readthedocs/oauth/admin.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Admin configuration for the OAuth app.""" diff --git a/readthedocs/oauth/migrations/0001_initial.py b/readthedocs/oauth/migrations/0001_initial.py index 2c7fba81b48..f3dbc75f38c 100644 --- a/readthedocs/oauth/migrations/0001_initial.py +++ b/readthedocs/oauth/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.conf import settings from django.db import migrations, models diff --git a/readthedocs/oauth/migrations/0002_combine_services.py b/readthedocs/oauth/migrations/0002_combine_services.py index 57980a5bc62..4bdfcbc2d0f 100644 --- a/readthedocs/oauth/migrations/0002_combine_services.py +++ b/readthedocs/oauth/migrations/0002_combine_services.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import django.core.validators from django.conf import settings from django.db import migrations, models diff --git a/readthedocs/oauth/migrations/0003_move_github.py b/readthedocs/oauth/migrations/0003_move_github.py index 535fdaef51b..02c4f515869 100644 --- a/readthedocs/oauth/migrations/0003_move_github.py +++ b/readthedocs/oauth/migrations/0003_move_github.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import gc import json import structlog diff --git a/readthedocs/oauth/migrations/0004_drop_github_and_bitbucket_models.py b/readthedocs/oauth/migrations/0004_drop_github_and_bitbucket_models.py index 5b00b8377e5..ef8158db2d3 100644 --- a/readthedocs/oauth/migrations/0004_drop_github_and_bitbucket_models.py +++ b/readthedocs/oauth/migrations/0004_drop_github_and_bitbucket_models.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations diff --git a/readthedocs/oauth/migrations/0005_add_account_relation.py b/readthedocs/oauth/migrations/0005_add_account_relation.py index 162f105a788..02703096599 100644 --- a/readthedocs/oauth/migrations/0005_add_account_relation.py +++ b/readthedocs/oauth/migrations/0005_add_account_relation.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/oauth/migrations/0006_move_oauth_source.py b/readthedocs/oauth/migrations/0006_move_oauth_source.py index 8689b134fa2..008cc038fa4 100644 --- a/readthedocs/oauth/migrations/0006_move_oauth_source.py +++ b/readthedocs/oauth/migrations/0006_move_oauth_source.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations diff --git a/readthedocs/oauth/migrations/0007_org_slug_nonunique.py b/readthedocs/oauth/migrations/0007_org_slug_nonunique.py index 97078038491..304ac60f044 100644 --- a/readthedocs/oauth/migrations/0007_org_slug_nonunique.py +++ b/readthedocs/oauth/migrations/0007_org_slug_nonunique.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/oauth/migrations/0008_add-project-relation.py b/readthedocs/oauth/migrations/0008_add-project-relation.py index 070b57e654c..ad4d2463ca4 100644 --- a/readthedocs/oauth/migrations/0008_add-project-relation.py +++ b/readthedocs/oauth/migrations/0008_add-project-relation.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-03-22 20:10 import django.db.models.deletion from django.db import migrations, models diff --git a/readthedocs/oauth/migrations/0009_add_missing_model_change_migrations.py b/readthedocs/oauth/migrations/0009_add_missing_model_change_migrations.py index c23743a846a..e2ff9180a6d 100644 --- a/readthedocs/oauth/migrations/0009_add_missing_model_change_migrations.py +++ b/readthedocs/oauth/migrations/0009_add_missing_model_change_migrations.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-31 11:25 import django.core.validators from django.db import migrations, models diff --git a/readthedocs/oauth/services/__init__.py b/readthedocs/oauth/services/__init__.py index a249e15d934..7b635947633 100644 --- a/readthedocs/oauth/services/__init__.py +++ b/readthedocs/oauth/services/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Conditional classes for OAuth services.""" diff --git a/readthedocs/payments/mixins.py b/readthedocs/payments/mixins.py index 291daead774..78ec3fd1758 100644 --- a/readthedocs/payments/mixins.py +++ b/readthedocs/payments/mixins.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Payment view mixin classes.""" diff --git a/readthedocs/projects/backends/views.py b/readthedocs/projects/backends/views.py index e95abc4f1a9..fcf31e0ad98 100644 --- a/readthedocs/projects/backends/views.py +++ b/readthedocs/projects/backends/views.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Project views loaded by configuration settings. diff --git a/readthedocs/projects/migrations/0001_initial.py b/readthedocs/projects/migrations/0001_initial.py index fc7dfb319de..5e3fb2e72cf 100644 --- a/readthedocs/projects/migrations/0001_initial.py +++ b/readthedocs/projects/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import taggit.managers from django.conf import settings from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0002_add_importedfile_model.py b/readthedocs/projects/migrations/0002_add_importedfile_model.py index 6a206f7dc4b..d7de9755566 100644 --- a/readthedocs/projects/migrations/0002_add_importedfile_model.py +++ b/readthedocs/projects/migrations/0002_add_importedfile_model.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0003_project_cdn_enabled.py b/readthedocs/projects/migrations/0003_project_cdn_enabled.py index e89cfed99ac..493eaa2bf58 100644 --- a/readthedocs/projects/migrations/0003_project_cdn_enabled.py +++ b/readthedocs/projects/migrations/0003_project_cdn_enabled.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0004_add_project_container_image.py b/readthedocs/projects/migrations/0004_add_project_container_image.py index 724e62e45fc..7d21bee59c1 100644 --- a/readthedocs/projects/migrations/0004_add_project_container_image.py +++ b/readthedocs/projects/migrations/0004_add_project_container_image.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0005_sync_project_model.py b/readthedocs/projects/migrations/0005_sync_project_model.py index 12537572ce8..81b787f4d81 100644 --- a/readthedocs/projects/migrations/0005_sync_project_model.py +++ b/readthedocs/projects/migrations/0005_sync_project_model.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0006_add_domain_models.py b/readthedocs/projects/migrations/0006_add_domain_models.py index dcd3282ab7d..07fd1a4752f 100644 --- a/readthedocs/projects/migrations/0006_add_domain_models.py +++ b/readthedocs/projects/migrations/0006_add_domain_models.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0007_migrate_canonical_data.py b/readthedocs/projects/migrations/0007_migrate_canonical_data.py index 633f975fc5c..0b0bb49accc 100644 --- a/readthedocs/projects/migrations/0007_migrate_canonical_data.py +++ b/readthedocs/projects/migrations/0007_migrate_canonical_data.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, transaction diff --git a/readthedocs/projects/migrations/0008_add_subproject_alias_prefix.py b/readthedocs/projects/migrations/0008_add_subproject_alias_prefix.py index ec61ecabd15..40ab18b350e 100644 --- a/readthedocs/projects/migrations/0008_add_subproject_alias_prefix.py +++ b/readthedocs/projects/migrations/0008_add_subproject_alias_prefix.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0009_add_domain_field.py b/readthedocs/projects/migrations/0009_add_domain_field.py index 4c910c74e44..edd167f05e1 100644 --- a/readthedocs/projects/migrations/0009_add_domain_field.py +++ b/readthedocs/projects/migrations/0009_add_domain_field.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import django.contrib.sites.models from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0010_migrate_domain_data.py b/readthedocs/projects/migrations/0010_migrate_domain_data.py index 49d3dc07bb9..2312417694e 100644 --- a/readthedocs/projects/migrations/0010_migrate_domain_data.py +++ b/readthedocs/projects/migrations/0010_migrate_domain_data.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from urllib.parse import urlparse from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0011_delete-url.py b/readthedocs/projects/migrations/0011_delete-url.py index 3b01ed32cf9..d475c387a02 100644 --- a/readthedocs/projects/migrations/0011_delete-url.py +++ b/readthedocs/projects/migrations/0011_delete-url.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations diff --git a/readthedocs/projects/migrations/0012_proper-name-for-install-project.py b/readthedocs/projects/migrations/0012_proper-name-for-install-project.py index 9f143977ca0..be3fb1e3df6 100644 --- a/readthedocs/projects/migrations/0012_proper-name-for-install-project.py +++ b/readthedocs/projects/migrations/0012_proper-name-for-install-project.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0013_add-container-limits.py b/readthedocs/projects/migrations/0013_add-container-limits.py index 9a052e00fc1..606c1bf20d8 100644 --- a/readthedocs/projects/migrations/0013_add-container-limits.py +++ b/readthedocs/projects/migrations/0013_add-container-limits.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0014_add-state-tracking.py b/readthedocs/projects/migrations/0014_add-state-tracking.py index d2c34c28e5a..7de6ebf19d6 100644 --- a/readthedocs/projects/migrations/0014_add-state-tracking.py +++ b/readthedocs/projects/migrations/0014_add-state-tracking.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0015_add_project_allow_promos.py b/readthedocs/projects/migrations/0015_add_project_allow_promos.py index 882893160fc..e5e57f63309 100644 --- a/readthedocs/projects/migrations/0015_add_project_allow_promos.py +++ b/readthedocs/projects/migrations/0015_add_project_allow_promos.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0016_build-queue-name.py b/readthedocs/projects/migrations/0016_build-queue-name.py index 0350bae8690..0809b37c3ac 100644 --- a/readthedocs/projects/migrations/0016_build-queue-name.py +++ b/readthedocs/projects/migrations/0016_build-queue-name.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations diff --git a/readthedocs/projects/migrations/0017_add_domain_https.py b/readthedocs/projects/migrations/0017_add_domain_https.py index 18788581ccf..ce916b1525d 100644 --- a/readthedocs/projects/migrations/0017_add_domain_https.py +++ b/readthedocs/projects/migrations/0017_add_domain_https.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0018_fix-translation-model.py b/readthedocs/projects/migrations/0018_fix-translation-model.py index 2541fb0d36b..cd9e70c1265 100644 --- a/readthedocs/projects/migrations/0018_fix-translation-model.py +++ b/readthedocs/projects/migrations/0018_fix-translation-model.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import django.db.models.deletion from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0019_add-features.py b/readthedocs/projects/migrations/0019_add-features.py index 6b7ee7a8bcd..b50a4da09b3 100644 --- a/readthedocs/projects/migrations/0019_add-features.py +++ b/readthedocs/projects/migrations/0019_add-features.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-10-27 12:55 from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0020_add-api-project-proxy.py b/readthedocs/projects/migrations/0020_add-api-project-proxy.py index 0040581f77b..8a124be5c46 100644 --- a/readthedocs/projects/migrations/0020_add-api-project-proxy.py +++ b/readthedocs/projects/migrations/0020_add-api-project-proxy.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-10-27 12:56 from django.db import migrations diff --git a/readthedocs/projects/migrations/0021_add-webhook-deprecation-feature.py b/readthedocs/projects/migrations/0021_add-webhook-deprecation-feature.py index 91f27b6d001..6e0acb7d707 100644 --- a/readthedocs/projects/migrations/0021_add-webhook-deprecation-feature.py +++ b/readthedocs/projects/migrations/0021_add-webhook-deprecation-feature.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Add feature for allowing access to deprecated webhook endpoints.""" diff --git a/readthedocs/projects/migrations/0022_add-alias-slug.py b/readthedocs/projects/migrations/0022_add-alias-slug.py index 90c434a2752..3938a0c7e4f 100644 --- a/readthedocs/projects/migrations/0022_add-alias-slug.py +++ b/readthedocs/projects/migrations/0022_add-alias-slug.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-12-21 16:30 from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0023_migrate-alias-slug.py b/readthedocs/projects/migrations/0023_migrate-alias-slug.py index 531c3dc332f..35f1f1f9da3 100644 --- a/readthedocs/projects/migrations/0023_migrate-alias-slug.py +++ b/readthedocs/projects/migrations/0023_migrate-alias-slug.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-12-21 16:31 import re diff --git a/readthedocs/projects/migrations/0024_add-show-version-warning.py b/readthedocs/projects/migrations/0024_add-show-version-warning.py index bfa0b2edb9e..a0b8865e552 100644 --- a/readthedocs/projects/migrations/0024_add-show-version-warning.py +++ b/readthedocs/projects/migrations/0024_add-show-version-warning.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-05-02 01:27 from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0025_show-version-warning-existing-projects.py b/readthedocs/projects/migrations/0025_show-version-warning-existing-projects.py index e38349fc52f..8877c5a0d59 100644 --- a/readthedocs/projects/migrations/0025_show-version-warning-existing-projects.py +++ b/readthedocs/projects/migrations/0025_show-version-warning-existing-projects.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-05-07 19:25 from django.db import migrations diff --git a/readthedocs/projects/migrations/0026_ad-free-option.py b/readthedocs/projects/migrations/0026_ad-free-option.py index d108f25e190..641aaaf6747 100644 --- a/readthedocs/projects/migrations/0026_ad-free-option.py +++ b/readthedocs/projects/migrations/0026_ad-free-option.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-06-29 15:53 from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0027_remove_json_with_html_feature.py b/readthedocs/projects/migrations/0027_remove_json_with_html_feature.py index d0fb5d14e93..372b18da01e 100644 --- a/readthedocs/projects/migrations/0027_remove_json_with_html_feature.py +++ b/readthedocs/projects/migrations/0027_remove_json_with_html_feature.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-08-22 09:19 from django.db import migrations diff --git a/readthedocs/projects/migrations/0028_remove_comments_and_update_old_migration.py b/readthedocs/projects/migrations/0028_remove_comments_and_update_old_migration.py index 4d4fc04a5a8..512628e8031 100644 --- a/readthedocs/projects/migrations/0028_remove_comments_and_update_old_migration.py +++ b/readthedocs/projects/migrations/0028_remove_comments_and_update_old_migration.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-31 10:08 from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0029_add_additional_languages.py b/readthedocs/projects/migrations/0029_add_additional_languages.py index 8e9e48d4b6f..bff30ddaf40 100644 --- a/readthedocs/projects/migrations/0029_add_additional_languages.py +++ b/readthedocs/projects/migrations/0029_add_additional_languages.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-01 13:38 from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0030_change-max-length-project-slug.py b/readthedocs/projects/migrations/0030_change-max-length-project-slug.py index ee27e9602a9..f6128753799 100644 --- a/readthedocs/projects/migrations/0030_change-max-length-project-slug.py +++ b/readthedocs/projects/migrations/0030_change-max-length-project-slug.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-01 20:55 from django.db import migrations, models from django.db.models.functions import Length diff --git a/readthedocs/projects/migrations/0031_add_modified_date_importedfile.py b/readthedocs/projects/migrations/0031_add_modified_date_importedfile.py index 617a420c2a3..857a273deb1 100644 --- a/readthedocs/projects/migrations/0031_add_modified_date_importedfile.py +++ b/readthedocs/projects/migrations/0031_add_modified_date_importedfile.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-01 14:37 from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0032_increase_webhook_maxsize.py b/readthedocs/projects/migrations/0032_increase_webhook_maxsize.py index 49b231590ed..bbf89975610 100644 --- a/readthedocs/projects/migrations/0032_increase_webhook_maxsize.py +++ b/readthedocs/projects/migrations/0032_increase_webhook_maxsize.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-06 23:12 from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0033_add_environment_variables.py b/readthedocs/projects/migrations/0033_add_environment_variables.py index 9279fa8b338..fdc074c9336 100644 --- a/readthedocs/projects/migrations/0033_add_environment_variables.py +++ b/readthedocs/projects/migrations/0033_add_environment_variables.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-12 13:57 import django.db.models.deletion import django_extensions.db.fields diff --git a/readthedocs/projects/migrations/0034_remove_unused_project_model_fields.py b/readthedocs/projects/migrations/0034_remove_unused_project_model_fields.py index 4ad8b27f8a5..c3fd79a5643 100644 --- a/readthedocs/projects/migrations/0034_remove_unused_project_model_fields.py +++ b/readthedocs/projects/migrations/0034_remove_unused_project_model_fields.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-05 12:20 from django.db import migrations diff --git a/readthedocs/projects/migrations/0035_container_time_limit_as_integer.py b/readthedocs/projects/migrations/0035_container_time_limit_as_integer.py index 7256548fd6f..6a1047092c2 100644 --- a/readthedocs/projects/migrations/0035_container_time_limit_as_integer.py +++ b/readthedocs/projects/migrations/0035_container_time_limit_as_integer.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-12-10 11:19 from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0036_remove-auto-doctype.py b/readthedocs/projects/migrations/0036_remove-auto-doctype.py index b0f9ad28165..3567edade5a 100644 --- a/readthedocs/projects/migrations/0036_remove-auto-doctype.py +++ b/readthedocs/projects/migrations/0036_remove-auto-doctype.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-12-17 17:32 from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0037_add_htmlfile.py b/readthedocs/projects/migrations/0037_add_htmlfile.py index dee21a140bd..ddce7a3b1c3 100644 --- a/readthedocs/projects/migrations/0037_add_htmlfile.py +++ b/readthedocs/projects/migrations/0037_add_htmlfile.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-01-22 19:13 from __future__ import unicode_literals diff --git a/readthedocs/projects/migrations/0038_change-default-python-interpreter.py b/readthedocs/projects/migrations/0038_change-default-python-interpreter.py index ddf624b6659..2a99de22266 100644 --- a/readthedocs/projects/migrations/0038_change-default-python-interpreter.py +++ b/readthedocs/projects/migrations/0038_change-default-python-interpreter.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-02-04 16:49 from __future__ import unicode_literals diff --git a/readthedocs/projects/migrations/0039_update-doctype-helptext.py b/readthedocs/projects/migrations/0039_update-doctype-helptext.py index 085b1a805cd..2a8e1b14a0e 100644 --- a/readthedocs/projects/migrations/0039_update-doctype-helptext.py +++ b/readthedocs/projects/migrations/0039_update-doctype-helptext.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-02-02 19:45 from __future__ import unicode_literals diff --git a/readthedocs/projects/migrations/0040_increase_path_max_length.py b/readthedocs/projects/migrations/0040_increase_path_max_length.py index 37778f6706e..dc67a927e1f 100644 --- a/readthedocs/projects/migrations/0040_increase_path_max_length.py +++ b/readthedocs/projects/migrations/0040_increase_path_max_length.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-02-23 15:05 from __future__ import unicode_literals diff --git a/readthedocs/projects/migrations/0041_index-repo-field.py b/readthedocs/projects/migrations/0041_index-repo-field.py index 7b53487b4bb..479bd11fc3b 100644 --- a/readthedocs/projects/migrations/0041_index-repo-field.py +++ b/readthedocs/projects/migrations/0041_index-repo-field.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-13 17:03 from __future__ import unicode_literals diff --git a/readthedocs/projects/migrations/0042_increase_env_variable_value_max_length.py b/readthedocs/projects/migrations/0042_increase_env_variable_value_max_length.py index 698c0f8d7ec..49f9ee292cb 100644 --- a/readthedocs/projects/migrations/0042_increase_env_variable_value_max_length.py +++ b/readthedocs/projects/migrations/0042_increase_env_variable_value_max_length.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-16 18:43 from __future__ import unicode_literals diff --git a/readthedocs/projects/migrations/0043_add-build-field.py b/readthedocs/projects/migrations/0043_add-build-field.py index de55c4e7a85..9ed5a706ae8 100644 --- a/readthedocs/projects/migrations/0043_add-build-field.py +++ b/readthedocs/projects/migrations/0043_add-build-field.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-06-13 18:03 from __future__ import unicode_literals diff --git a/readthedocs/projects/migrations/0044_auto_20190703_1300.py b/readthedocs/projects/migrations/0044_auto_20190703_1300.py index ae08a531eb6..3bb96ce2887 100644 --- a/readthedocs/projects/migrations/0044_auto_20190703_1300.py +++ b/readthedocs/projects/migrations/0044_auto_20190703_1300.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-07-03 13:00 from __future__ import unicode_literals diff --git a/readthedocs/projects/migrations/0071_add_env_var_privacy.py b/readthedocs/projects/migrations/0071_add_env_var_privacy.py index 2f49734806d..5de97cf8473 100644 --- a/readthedocs/projects/migrations/0071_add_env_var_privacy.py +++ b/readthedocs/projects/migrations/0071_add_env_var_privacy.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/projects/notifications.py b/readthedocs/projects/notifications.py index 9be8d635dab..2ec32b9bebe 100644 --- a/readthedocs/projects/notifications.py +++ b/readthedocs/projects/notifications.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Project notifications.""" diff --git a/readthedocs/redirects/admin.py b/readthedocs/redirects/admin.py index aacdda699fd..8c6f6338139 100644 --- a/readthedocs/redirects/admin.py +++ b/readthedocs/redirects/admin.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Django admin configuration for the redirects app.""" diff --git a/readthedocs/redirects/migrations/0001_initial.py b/readthedocs/redirects/migrations/0001_initial.py index b7d42bb9bf7..4da10adc87c 100644 --- a/readthedocs/redirects/migrations/0001_initial.py +++ b/readthedocs/redirects/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.db import migrations, models diff --git a/readthedocs/redirects/migrations/0002_add_missing_model_change_migrations.py b/readthedocs/redirects/migrations/0002_add_missing_model_change_migrations.py index e1d83010c0a..4e5a6228bad 100644 --- a/readthedocs/redirects/migrations/0002_add_missing_model_change_migrations.py +++ b/readthedocs/redirects/migrations/0002_add_missing_model_change_migrations.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-31 11:25 from django.db import migrations, models diff --git a/readthedocs/redirects/migrations/0003_add_default_redirect_http_status_to_302.py b/readthedocs/redirects/migrations/0003_add_default_redirect_http_status_to_302.py index dfa44417963..3823bb00c2e 100644 --- a/readthedocs/redirects/migrations/0003_add_default_redirect_http_status_to_302.py +++ b/readthedocs/redirects/migrations/0003_add_default_redirect_http_status_to_302.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-23 15:25 from __future__ import unicode_literals diff --git a/readthedocs/redirects/migrations/0004_denormalize-from-url.py b/readthedocs/redirects/migrations/0004_denormalize-from-url.py index 3e61ab3675a..32d9c98fefe 100644 --- a/readthedocs/redirects/migrations/0004_denormalize-from-url.py +++ b/readthedocs/redirects/migrations/0004_denormalize-from-url.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.26 on 2020-03-14 14:15 from __future__ import unicode_literals diff --git a/readthedocs/rtd_tests/files/conf.py b/readthedocs/rtd_tests/files/conf.py index 4007dcfab19..9acb38beef3 100644 --- a/readthedocs/rtd_tests/files/conf.py +++ b/readthedocs/rtd_tests/files/conf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals diff --git a/readthedocs/rtd_tests/fixtures/sample_repo/source/conf.py b/readthedocs/rtd_tests/fixtures/sample_repo/source/conf.py index e6c4dad0f4b..786513f9e27 100644 --- a/readthedocs/rtd_tests/fixtures/sample_repo/source/conf.py +++ b/readthedocs/rtd_tests/fixtures/sample_repo/source/conf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # sample documentation build configuration file, created by # sphinx-quickstart on Sat Jun 18 07:17:29 2011. diff --git a/readthedocs/rtd_tests/mocks/paths.py b/readthedocs/rtd_tests/mocks/paths.py index 99806a9158b..752507b4505 100644 --- a/readthedocs/rtd_tests/mocks/paths.py +++ b/readthedocs/rtd_tests/mocks/paths.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Context managers to patch os.path.exists calls.""" import os import re diff --git a/readthedocs/rtd_tests/tests/projects/test_admin_actions.py b/readthedocs/rtd_tests/tests/projects/test_admin_actions.py index cb4c794e523..9627c76033e 100644 --- a/readthedocs/rtd_tests/tests/projects/test_admin_actions.py +++ b/readthedocs/rtd_tests/tests/projects/test_admin_actions.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import django_dynamic_fixture as fixture from unittest import mock from django import urls diff --git a/readthedocs/rtd_tests/tests/test_backend_svn.py b/readthedocs/rtd_tests/tests/test_backend_svn.py index 3c998816c93..fae5c9de7d9 100644 --- a/readthedocs/rtd_tests/tests/test_backend_svn.py +++ b/readthedocs/rtd_tests/tests/test_backend_svn.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Tests For SVN.""" from django.test import TestCase diff --git a/readthedocs/rtd_tests/tests/test_build_config.py b/readthedocs/rtd_tests/tests/test_build_config.py index 2d1c0d1a0e5..2196ec381ee 100644 --- a/readthedocs/rtd_tests/tests/test_build_config.py +++ b/readthedocs/rtd_tests/tests/test_build_config.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from os import path import pytest diff --git a/readthedocs/rtd_tests/tests/test_extend.py b/readthedocs/rtd_tests/tests/test_extend.py index 74ddbcf8d1f..44163eae043 100644 --- a/readthedocs/rtd_tests/tests/test_extend.py +++ b/readthedocs/rtd_tests/tests/test_extend.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.test import TestCase, override_settings from readthedocs.core.utils.extend import ( diff --git a/readthedocs/rtd_tests/tests/test_single_version.py b/readthedocs/rtd_tests/tests/test_single_version.py index e69b80375af..c599a6c12c8 100644 --- a/readthedocs/rtd_tests/tests/test_single_version.py +++ b/readthedocs/rtd_tests/tests/test_single_version.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import django_dynamic_fixture as fixture from django.test import TestCase from django.test.utils import override_settings diff --git a/readthedocs/rtd_tests/tests/test_version_commit_name.py b/readthedocs/rtd_tests/tests/test_version_commit_name.py index f7367865c9e..473852d44a5 100644 --- a/readthedocs/rtd_tests/tests/test_version_commit_name.py +++ b/readthedocs/rtd_tests/tests/test_version_commit_name.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.test import TestCase from django_dynamic_fixture import get, new diff --git a/readthedocs/rtd_tests/tests/test_version_slug.py b/readthedocs/rtd_tests/tests/test_version_slug.py index 9ccb7edff77..1d8ebe14b21 100644 --- a/readthedocs/rtd_tests/tests/test_version_slug.py +++ b/readthedocs/rtd_tests/tests/test_version_slug.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import re from django.test import TestCase diff --git a/readthedocs/search/migrations/0001_initial.py b/readthedocs/search/migrations/0001_initial.py index e24c99948ef..790b6c10412 100644 --- a/readthedocs/search/migrations/0001_initial.py +++ b/readthedocs/search/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-08-01 13:57 from __future__ import unicode_literals diff --git a/readthedocs/sphinx_domains/migrations/0001_initial.py b/readthedocs/sphinx_domains/migrations/0001_initial.py index 1f205b4c452..f083ce22522 100644 --- a/readthedocs/sphinx_domains/migrations/0001_initial.py +++ b/readthedocs/sphinx_domains/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-02-27 16:23 from __future__ import unicode_literals diff --git a/readthedocs/sphinx_domains/migrations/0002_increase_max_length.py b/readthedocs/sphinx_domains/migrations/0002_increase_max_length.py index d370cf576b7..3ae40d3f8a7 100644 --- a/readthedocs/sphinx_domains/migrations/0002_increase_max_length.py +++ b/readthedocs/sphinx_domains/migrations/0002_increase_max_length.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-02-27 16:50 from __future__ import unicode_literals diff --git a/readthedocs/sphinx_domains/migrations/0003_additional_indexed_fields.py b/readthedocs/sphinx_domains/migrations/0003_additional_indexed_fields.py index 9fbda5d2653..40ed6d516fc 100644 --- a/readthedocs/sphinx_domains/migrations/0003_additional_indexed_fields.py +++ b/readthedocs/sphinx_domains/migrations/0003_additional_indexed_fields.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-01 14:25 from __future__ import unicode_literals diff --git a/readthedocs/sphinx_domains/migrations/0004_add-build-field.py b/readthedocs/sphinx_domains/migrations/0004_add-build-field.py index 87fae481bd9..4d06d7b9847 100644 --- a/readthedocs/sphinx_domains/migrations/0004_add-build-field.py +++ b/readthedocs/sphinx_domains/migrations/0004_add-build-field.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-06-13 18:03 from __future__ import unicode_literals diff --git a/readthedocs/sphinx_domains/migrations/0005_htmlfile-sphinx-domain-integration.py b/readthedocs/sphinx_domains/migrations/0005_htmlfile-sphinx-domain-integration.py index 4821beb0fb6..754c05e7288 100644 --- a/readthedocs/sphinx_domains/migrations/0005_htmlfile-sphinx-domain-integration.py +++ b/readthedocs/sphinx_domains/migrations/0005_htmlfile-sphinx-domain-integration.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-06-25 23:18 from __future__ import unicode_literals From d744ddedd9c12a532c7adb8560227c417bcea304 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 8 Mar 2023 20:50:27 +0100 Subject: [PATCH 03/13] Lint: outdated symlink --- prospector-more.yml | 1 - 1 file changed, 1 deletion(-) delete mode 120000 prospector-more.yml diff --git a/prospector-more.yml b/prospector-more.yml deleted file mode 120000 index f21e968a5ee..00000000000 --- a/prospector-more.yml +++ /dev/null @@ -1 +0,0 @@ -common/prospector-more.yml \ No newline at end of file From 751b2e87a1c8ab285b1b133b943d8492936d0428 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 8 Mar 2023 20:52:16 +0100 Subject: [PATCH 04/13] Lint: remove unused imports --- .../builds/migrations/0031_add_version_fields_to_build.py | 1 - readthedocs/builds/migrations/0040_remove_old_jsonfields.py | 2 +- readthedocs/builds/tests/test_celery_task_router.py | 2 -- readthedocs/config/tests/test_validation.py | 2 -- readthedocs/embed/v3/tests/examples/default/conf.py | 1 - readthedocs/embed/v3/tests/test_basics.py | 1 - readthedocs/gold/models.py | 2 -- readthedocs/gold/urls.py | 1 - .../integrations/migrations/0010_remove_old_jsonfields.py | 2 +- readthedocs/projects/tests/test_docker_environment.py | 1 - readthedocs/rtd_tests/tests/test_core_tags.py | 1 - readthedocs/rtd_tests/tests/test_redirects.py | 2 -- readthedocs/search/signals.py | 1 - 13 files changed, 2 insertions(+), 17 deletions(-) diff --git a/readthedocs/builds/migrations/0031_add_version_fields_to_build.py b/readthedocs/builds/migrations/0031_add_version_fields_to_build.py index cb9a86db488..bed954a4f26 100644 --- a/readthedocs/builds/migrations/0031_add_version_fields_to_build.py +++ b/readthedocs/builds/migrations/0031_add_version_fields_to_build.py @@ -1,7 +1,6 @@ # Generated by Django 2.2.16 on 2020-11-18 21:52 from django.db import migrations, models -import django.db.models.deletion class Migration(migrations.Migration): diff --git a/readthedocs/builds/migrations/0040_remove_old_jsonfields.py b/readthedocs/builds/migrations/0040_remove_old_jsonfields.py index 6d0cfd07d86..25e3cad7a92 100644 --- a/readthedocs/builds/migrations/0040_remove_old_jsonfields.py +++ b/readthedocs/builds/migrations/0040_remove_old_jsonfields.py @@ -1,6 +1,6 @@ # Generated by Django 3.2.11 on 2022-01-31 12:12 -from django.db import migrations, models +from django.db import migrations class Migration(migrations.Migration): diff --git a/readthedocs/builds/tests/test_celery_task_router.py b/readthedocs/builds/tests/test_celery_task_router.py index 6cb694f6b71..689c247a9d5 100644 --- a/readthedocs/builds/tests/test_celery_task_router.py +++ b/readthedocs/builds/tests/test_celery_task_router.py @@ -1,7 +1,5 @@ import django_dynamic_fixture as fixture -from django.conf import settings from django.test import TestCase -from django.test.utils import override_settings from readthedocs.builds.constants import EXTERNAL from readthedocs.builds.models import Build, Version diff --git a/readthedocs/config/tests/test_validation.py b/readthedocs/config/tests/test_validation.py index 400657b2c24..4402e130670 100644 --- a/readthedocs/config/tests/test_validation.py +++ b/readthedocs/config/tests/test_validation.py @@ -1,6 +1,4 @@ -import os -from unittest.mock import patch from pytest import raises from readthedocs.config.validation import ( diff --git a/readthedocs/embed/v3/tests/examples/default/conf.py b/readthedocs/embed/v3/tests/examples/default/conf.py index b8fe3483942..bbab1078424 100644 --- a/readthedocs/embed/v3/tests/examples/default/conf.py +++ b/readthedocs/embed/v3/tests/examples/default/conf.py @@ -1,5 +1,4 @@ # conf.py to run tests -import sphinxcontrib.bibtex master_doc = 'index' extensions = [ diff --git a/readthedocs/embed/v3/tests/test_basics.py b/readthedocs/embed/v3/tests/test_basics.py index 56bf7e2b965..a50c24801e3 100644 --- a/readthedocs/embed/v3/tests/test_basics.py +++ b/readthedocs/embed/v3/tests/test_basics.py @@ -4,7 +4,6 @@ from django.core.cache import cache from django.urls import reverse -from .utils import srcdir @pytest.mark.django_db diff --git a/readthedocs/gold/models.py b/readthedocs/gold/models.py index 088940d9148..375e8dc2476 100644 --- a/readthedocs/gold/models.py +++ b/readthedocs/gold/models.py @@ -1,8 +1,6 @@ """Django models for recurring donations aka Gold membership.""" import math -from datetime import datetime -import pytz from django.contrib.auth.models import User from django.db import models from django.utils.translation import gettext_lazy as _ diff --git a/readthedocs/gold/urls.py b/readthedocs/gold/urls.py index 2a02c58ee2c..95c492059d0 100644 --- a/readthedocs/gold/urls.py +++ b/readthedocs/gold/urls.py @@ -2,7 +2,6 @@ """Gold subscription URLs.""" from django.conf.urls import re_path -from django.views.generic.base import TemplateView from readthedocs.gold import views from readthedocs.projects.constants import PROJECT_SLUG_REGEX diff --git a/readthedocs/integrations/migrations/0010_remove_old_jsonfields.py b/readthedocs/integrations/migrations/0010_remove_old_jsonfields.py index c1f53454b88..e205c9bf627 100644 --- a/readthedocs/integrations/migrations/0010_remove_old_jsonfields.py +++ b/readthedocs/integrations/migrations/0010_remove_old_jsonfields.py @@ -1,6 +1,6 @@ # Generated by Django 3.2.11 on 2022-01-31 12:12 -from django.db import migrations, models +from django.db import migrations class Migration(migrations.Migration): diff --git a/readthedocs/projects/tests/test_docker_environment.py b/readthedocs/projects/tests/test_docker_environment.py index 0ada93fe631..2779726a9e8 100644 --- a/readthedocs/projects/tests/test_docker_environment.py +++ b/readthedocs/projects/tests/test_docker_environment.py @@ -1,4 +1,3 @@ -from unittest import mock import pytest import django_dynamic_fixture as fixture diff --git a/readthedocs/rtd_tests/tests/test_core_tags.py b/readthedocs/rtd_tests/tests/test_core_tags.py index 6e4cb110281..27f8763b1b7 100644 --- a/readthedocs/rtd_tests/tests/test_core_tags.py +++ b/readthedocs/rtd_tests/tests/test_core_tags.py @@ -1,4 +1,3 @@ -from unittest import mock from django.conf import settings from django.test import TestCase from django.test.utils import override_settings diff --git a/readthedocs/rtd_tests/tests/test_redirects.py b/readthedocs/rtd_tests/tests/test_redirects.py index ac58efa6bcb..f9ef5821674 100644 --- a/readthedocs/rtd_tests/tests/test_redirects.py +++ b/readthedocs/rtd_tests/tests/test_redirects.py @@ -1,10 +1,8 @@ -from django.http import Http404 from django.test import TestCase from django.test.utils import override_settings from django_dynamic_fixture import fixture, get from readthedocs.builds.constants import LATEST -from readthedocs.builds.models import Version from readthedocs.projects.models import Project from readthedocs.redirects.models import Redirect diff --git a/readthedocs/search/signals.py b/readthedocs/search/signals.py index aed22f0b02a..74480c95598 100644 --- a/readthedocs/search/signals.py +++ b/readthedocs/search/signals.py @@ -4,7 +4,6 @@ from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from django_elasticsearch_dsl.apps import DEDConfig -from django_elasticsearch_dsl.registries import registry from readthedocs.projects.models import Project from readthedocs.search.tasks import delete_objects_in_es, index_objects_to_es From c425a53ba17c75dfbe262522c27fcf9d24f8a3f1 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 8 Mar 2023 20:54:28 +0100 Subject: [PATCH 05/13] Lint: noqa places where autoflake gets confused --- readthedocs/builds/apps.py | 3 +-- readthedocs/core/apps.py | 6 ++---- readthedocs/projects/apps.py | 6 +++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/readthedocs/builds/apps.py b/readthedocs/builds/apps.py index 92ba620b10b..c316b01fd92 100644 --- a/readthedocs/builds/apps.py +++ b/readthedocs/builds/apps.py @@ -1,5 +1,4 @@ import structlog - from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ @@ -12,4 +11,4 @@ class Config(AppConfig): verbose_name = _("Builds") def ready(self): - import readthedocs.builds.tasks + import readthedocs.builds.task # noqa diff --git a/readthedocs/core/apps.py b/readthedocs/core/apps.py index 406d1fa32f5..8c8c157bb45 100644 --- a/readthedocs/core/apps.py +++ b/readthedocs/core/apps.py @@ -1,7 +1,6 @@ """App configurations for core app.""" import structlog - from django.apps import AppConfig log = structlog.get_logger(__name__) @@ -12,12 +11,11 @@ class CoreAppConfig(AppConfig): verbose_name = 'Core' def ready(self): - import readthedocs.core.signals # noqa - # Import `readthedocs.core.logs` to set up structlog import readthedocs.core.logs # noqa + import readthedocs.core.signals # noqa try: - import readthedocsext.monitoring.metrics.tasks + import readthedocsext.monitoring.metrics.tasks # noqa except (ModuleNotFoundError, ImportError): log.info('Metrics tasks could not be imported.') diff --git a/readthedocs/projects/apps.py b/readthedocs/projects/apps.py index a8cabefab65..1c4f18ce739 100644 --- a/readthedocs/projects/apps.py +++ b/readthedocs/projects/apps.py @@ -8,6 +8,6 @@ class ProjectsConfig(AppConfig): name = 'readthedocs.projects' def ready(self): - import readthedocs.projects.tasks.builds - import readthedocs.projects.tasks.search - import readthedocs.projects.tasks.utils + import readthedocs.projects.tasks.builds # noqa + import readthedocs.projects.tasks.search # noqa + import readthedocs.projects.tasks.utils # noqa From 45f8fcac14cc3a229c67e9b20189fdd823b7c51c Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 8 Mar 2023 20:56:21 +0100 Subject: [PATCH 06/13] Lint: permalinks --- readthedocs/api/v3/renderers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs/api/v3/renderers.py b/readthedocs/api/v3/renderers.py index 07877244da4..31e65116dd7 100644 --- a/readthedocs/api/v3/renderers.py +++ b/readthedocs/api/v3/renderers.py @@ -25,7 +25,7 @@ def render(self, data, accepted_media_type=None, renderer_context=None): - sort_keys=True on json.dumps - use str instead of six.text_types - https://github.com/encode/django-rest-framework/blob/master/rest_framework/renderers.py#L89 + https://github.com/encode/django-rest-framework/blob/b7523f4/rest_framework/renderers.py#L84 """ if data is None: return bytes() From a909855837061de91ab25bc95ea81e91ab461039 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 8 Mar 2023 20:56:59 +0100 Subject: [PATCH 07/13] Lint: trailing whitespaces --- readthedocs/core/tests/test_contact.py | 2 +- readthedocs/embed/tests/data/mkdocs/latest/index.json | 6 +++--- readthedocs/organizations/tests/test_privacy_urls.py | 2 +- .../tests/data/mkdocs/in/mkdocs-1.1/configuration.html | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/readthedocs/core/tests/test_contact.py b/readthedocs/core/tests/test_contact.py index b1d0eae01d0..97cc37f32cf 100644 --- a/readthedocs/core/tests/test_contact.py +++ b/readthedocs/core/tests/test_contact.py @@ -15,7 +15,7 @@ def setUp(self): self.user = get(User, username='test', email='one@test.com') self.user_two = get(User, username='test2', email='two@test.com') self.user_three = get(User, username='test3', email='three@test.com') - + @mock.patch('readthedocs.core.utils.contact.send_mail') @mock.patch.object(SiteBackend, 'send') def test_contact_users_dryrun(self, send_notification, send_mail): diff --git a/readthedocs/embed/tests/data/mkdocs/latest/index.json b/readthedocs/embed/tests/data/mkdocs/latest/index.json index 829508f65b4..86645917a43 100644 --- a/readthedocs/embed/tests/data/mkdocs/latest/index.json +++ b/readthedocs/embed/tests/data/mkdocs/latest/index.json @@ -1,6 +1,6 @@ { - "content": "

MkDocs\uf0c1

\n

Project documentation with Markdown.

\n
\n

Overview\uf0c1

\n

MkDocs is a fast, simple and downright gorgeous static site\ngenerator that's geared towards building project documentation. Documentation\nsource files are written in Markdown, and configured with a single YAML\nconfiguration file.

\n

Host anywhere\uf0c1

\n

MkDocs builds completely static HTML sites that you can host on GitHub pages,\nAmazon S3, or anywhere else you choose.

\n

Great themes available\uf0c1

\n

There's a stack of good looking themes available for MkDocs. Choose between\nthe built in themes: mkdocs and readthedocs, select one of the 3rd\nparty themes in the MkDocs wiki, or build your own.

\n

Preview your site as you work\uf0c1

\n

The built-in dev-server allows you to preview your documentation as you're\nwriting it. It will even auto-reload and refresh your browser whenever you save\nyour changes.

\n

Easy to customize\uf0c1

\n

Get your project documentation looking just the way you want it by customizing\nthe theme.

\n
\n

Installation\uf0c1

\n

Install with a Package Manager\uf0c1

\n

If you have and use a package manager (such as apt-get, dnf, homebrew,\nyum, chocolatey, etc.) to install packages on your system, then you may\nwant to search for a \"MkDocs\" package and, if a recent version is available,\ninstall it with your package manager (check your system's documentation for\ndetails). That's it, you're done! Skip down to Getting Started.

\n

If your package manager does not have a recent \"MkDocs\" package, you can still\nuse your package manager to install \"Python\" and \"pip\". Then you can use pip to\ninstall MkDocs.

\n

Manual Installation\uf0c1

\n

In order to manually install MkDocs you'll need Python installed on your\nsystem, as well as the Python package manager, pip. You can check if you have\nthese already installed from the command line:

\n
$ python --version\nPython 2.7.2\n$ pip --version\npip 1.5.2\n
\n\n

MkDocs supports Python versions 2.7, 3.3, 3.4, 3.5 and pypy.

\n

Installing Python\uf0c1

\n

Install Python by downloading an installer appropriate for your system from\npython.org and running it.

\n
\n

Note

\n

If you are installing Python on Windows, be sure to check the box to have\nPython added to your PATH if the installer offers such an option (it's\nnormally off by default).

\n

\"Add

\n
\n

Installing pip\uf0c1

\n

If you're using a recent version of Python, the Python package manager, pip,\nis most likely installed by default. However, you may need to upgrade pip to the\nlasted version:

\n
pip install --upgrade pip\n
\n\n

If you need to install pip for the first time, download get-pip.py.\nThen run the following command to install it:

\n
python get-pip.py\n
\n\n

Installing MkDocs\uf0c1

\n

Install the mkdocs package using pip:

\n
pip install mkdocs\n
\n\n

You should now have the mkdocs command installed on your system. Run mkdocs\n--version to check that everything worked okay.

\n
$ mkdocs --version\nmkdocs, version 0.15.3\n
\n\n
\n

Note

\n

If you are using Windows, some of the above commands may not work\nout-of-the-box.

\n

A quick solution may be to preface every Python command with python -m\nlike this:

\n
python -m pip install mkdocs\npython -m mkdocs\n
\n

For a more permanent solution, you may need to edit your PATH environment\nvariable to include the Scripts directory of your Python installation.\nRecent versions of Python include a script to do this for you. Navigate to\nyour Python installation directory (for example C:\\Python34\\), open the\nTools, then Scripts folder, and run the win_add2path.py file by double\nclicking on it. Alternatively, you can download the script and run it\n(python win_add2path.py).

\n
\n
\n

Getting Started\uf0c1

\n

Getting started is super easy.

\n
mkdocs new my-project\ncd my-project\n
\n\n

Take a moment to review the initial project that has been created for you.

\n

\"The

\n

There's a single configuration file named mkdocs.yml, and a folder named\ndocs that will contain your documentation source files. Right now the docs\nfolder just contains a single documentation page, named index.md.

\n

MkDocs comes with a built-in dev-server that lets you preview your documentation\nas you work on it. Make sure you're in the same directory as the mkdocs.yml\nconfiguration file, and then start the server by running the mkdocs serve\ncommand:

\n
$ mkdocs serve\nINFO    -  Building documentation...\nINFO    -  Cleaning site directory\n[I 160402 15:50:43 server:271] Serving on http://127.0.0.1:8000\n[I 160402 15:50:43 handlers:58] Start watching changes\n[I 160402 15:50:43 handlers:60] Start detecting changes\n
\n\n

Open up http://127.0.0.1:8000/ in your browser, and you'll see the default\nhome page being displayed:

\n

\"The

\n

The dev-server also supports auto-reloading, and will rebuild your documentation\nwhenever anything in the configuration file, documentation directory, or theme\ndirectory changes.

\n

Open the docs/index.md document in your text editor of choice, change the\ninitial heading to MkLorum, and save your changes. Your browser will\nauto-reload and you should see your updated documentation immediately.

\n

Now try editing the configuration file: mkdocs.yml. Change the\nsite_name setting to MkLorum and save the file.

\n
site_name: MkLorum\n
\n\n

Your browser should immediately reload, and you'll see your new site name take\neffect.

\n

\"The

\n

Adding pages\uf0c1

\n

Now add a second page to your documentation:

\n
curl 'https://jaspervdj.be/lorem-markdownum/markdown.txt' > docs/about.md\n
\n\n

As our documentation site will include some navigation headers, you may want to\nedit the configuration file and add some information about the order, title, and\nnesting of each page in the navigation header by adding a pages\nsetting:

\n
site_name: MkLorum\npages:\n    - Home: index.md\n    - About: about.md\n
\n\n

Save your changes and you'll now see a navigation bar with Home and About\nitems on the left as well as Search, Previous, and Next items on the\nright.

\n

\"Screenshot\"

\n

Try the menu items and navigate back and forth between pages. Then click on\nSearch. A search dialog will appear, allowing you to search for any text on\nany page. Notice that the search results include every occurrence of the search\nterm on the site and links directly to the section of the page in which the\nsearch term appears. You get of all that with no effort or configuration on your\npart!

\n

\"Screenshot\"

\n

Theming our documentation\uf0c1

\n

Now change the configuration file to alter how the documentation is displayed by\nchanging the theme. Edit the mkdocs.yml file and add a theme setting:

\n
site_name: MkLorum\npages:\n    - Home: index.md\n    - About: about.md\ntheme: readthedocs\n
\n\n

Save your changes, and you'll see the ReadTheDocs theme being used.

\n

\"Screenshot\"

\n

Changing the Favicon Icon\uf0c1

\n

By default, MkDocs uses the MkDocs favicon icon. To use a different icon, create\nan img subdirectory in your docs_dir and copy your custom favicon.ico file\nto that directory. MkDocs will automatically detect and use that file as your\nfavicon icon.

\n

Building the site\uf0c1

\n

That's looking good. You're ready to deploy the first pass of your MkLorum\ndocumentation. First build the documentation:

\n
mkdocs build\n
\n\n

This will create a new directory, named site. Take a look inside the\ndirectory:

\n
$ ls site\nabout  fonts  index.html  license  search.html\ncss    img    js          mkdocs   sitemap.xml\n
\n\n

Notice that your source documentation has been output as two HTML files named\nindex.html and about/index.html. You also have various other media that's\nbeen copied into the site directory as part of the documentation theme. You\neven have a sitemap.xml file and mkdocs/search_index.json.

\n

If you're using source code control such as git you probably don't want to\ncheck your documentation builds into the repository. Add a line containing\nsite/ to your .gitignore file.

\n
echo "site/" >> .gitignore\n
\n\n

If you're using another source code control tool you'll want to check its\ndocumentation on how to ignore specific directories.

\n

After some time, files may be removed from the documentation but they will still\nreside in the site directory. To remove those stale files, just run mkdocs\nwith the --clean switch.

\n
mkdocs build --clean\n
\n\n

Other Commands and Options\uf0c1

\n

There are various other commands and options available. For a complete list of\ncommands, use the --help flag:

\n
mkdocs --help\n
\n\n

To view a list of options available on a given command, use the --help flag\nwith that command. For example, to get a list of all options available for the\nbuild command run the following:

\n
mkdocs build --help\n
\n\n

Deploying\uf0c1

\n

The documentation site that you just built only uses static files so you'll be\nable to host it from pretty much anywhere. GitHub project pages and Amazon\nS3 may be good hosting options, depending upon your needs. Upload the contents\nof the entire site directory to wherever you're hosting your website from and\nyou're done. For specific instructions on a number of common hosts, see the\nDeploying your Docs page.

\n

Getting help\uf0c1

\n

To get help with MkDocs, please use the discussion group, GitHub issues or\nthe MkDocs IRC channel #mkdocs on freenode.

", - "url": "/", - "language": "en", + "content": "

MkDocs\uf0c1

\n

Project documentation with Markdown.

\n
\n

Overview\uf0c1

\n

MkDocs is a fast, simple and downright gorgeous static site\ngenerator that's geared towards building project documentation. Documentation\nsource files are written in Markdown, and configured with a single YAML\nconfiguration file.

\n

Host anywhere\uf0c1

\n

MkDocs builds completely static HTML sites that you can host on GitHub pages,\nAmazon S3, or anywhere else you choose.

\n

Great themes available\uf0c1

\n

There's a stack of good looking themes available for MkDocs. Choose between\nthe built in themes: mkdocs and readthedocs, select one of the 3rd\nparty themes in the MkDocs wiki, or build your own.

\n

Preview your site as you work\uf0c1

\n

The built-in dev-server allows you to preview your documentation as you're\nwriting it. It will even auto-reload and refresh your browser whenever you save\nyour changes.

\n

Easy to customize\uf0c1

\n

Get your project documentation looking just the way you want it by customizing\nthe theme.

\n
\n

Installation\uf0c1

\n

Install with a Package Manager\uf0c1

\n

If you have and use a package manager (such as apt-get, dnf, homebrew,\nyum, chocolatey, etc.) to install packages on your system, then you may\nwant to search for a \"MkDocs\" package and, if a recent version is available,\ninstall it with your package manager (check your system's documentation for\ndetails). That's it, you're done! Skip down to Getting Started.

\n

If your package manager does not have a recent \"MkDocs\" package, you can still\nuse your package manager to install \"Python\" and \"pip\". Then you can use pip to\ninstall MkDocs.

\n

Manual Installation\uf0c1

\n

In order to manually install MkDocs you'll need Python installed on your\nsystem, as well as the Python package manager, pip. You can check if you have\nthese already installed from the command line:

\n
$ python --version\nPython 2.7.2\n$ pip --version\npip 1.5.2\n
\n\n

MkDocs supports Python versions 2.7, 3.3, 3.4, 3.5 and pypy.

\n

Installing Python\uf0c1

\n

Install Python by downloading an installer appropriate for your system from\npython.org and running it.

\n
\n

Note

\n

If you are installing Python on Windows, be sure to check the box to have\nPython added to your PATH if the installer offers such an option (it's\nnormally off by default).

\n

\"Add

\n
\n

Installing pip\uf0c1

\n

If you're using a recent version of Python, the Python package manager, pip,\nis most likely installed by default. However, you may need to upgrade pip to the\nlasted version:

\n
pip install --upgrade pip\n
\n\n

If you need to install pip for the first time, download get-pip.py.\nThen run the following command to install it:

\n
python get-pip.py\n
\n\n

Installing MkDocs\uf0c1

\n

Install the mkdocs package using pip:

\n
pip install mkdocs\n
\n\n

You should now have the mkdocs command installed on your system. Run mkdocs\n--version to check that everything worked okay.

\n
$ mkdocs --version\nmkdocs, version 0.15.3\n
\n\n
\n

Note

\n

If you are using Windows, some of the above commands may not work\nout-of-the-box.

\n

A quick solution may be to preface every Python command with python -m\nlike this:

\n
python -m pip install mkdocs\npython -m mkdocs\n
\n

For a more permanent solution, you may need to edit your PATH environment\nvariable to include the Scripts directory of your Python installation.\nRecent versions of Python include a script to do this for you. Navigate to\nyour Python installation directory (for example C:\\Python34\\), open the\nTools, then Scripts folder, and run the win_add2path.py file by double\nclicking on it. Alternatively, you can download the script and run it\n(python win_add2path.py).

\n
\n
\n

Getting Started\uf0c1

\n

Getting started is super easy.

\n
mkdocs new my-project\ncd my-project\n
\n\n

Take a moment to review the initial project that has been created for you.

\n

\"The

\n

There's a single configuration file named mkdocs.yml, and a folder named\ndocs that will contain your documentation source files. Right now the docs\nfolder just contains a single documentation page, named index.md.

\n

MkDocs comes with a built-in dev-server that lets you preview your documentation\nas you work on it. Make sure you're in the same directory as the mkdocs.yml\nconfiguration file, and then start the server by running the mkdocs serve\ncommand:

\n
$ mkdocs serve\nINFO    -  Building documentation...\nINFO    -  Cleaning site directory\n[I 160402 15:50:43 server:271] Serving on http://127.0.0.1:8000\n[I 160402 15:50:43 handlers:58] Start watching changes\n[I 160402 15:50:43 handlers:60] Start detecting changes\n
\n\n

Open up http://127.0.0.1:8000/ in your browser, and you'll see the default\nhome page being displayed:

\n

\"The

\n

The dev-server also supports auto-reloading, and will rebuild your documentation\nwhenever anything in the configuration file, documentation directory, or theme\ndirectory changes.

\n

Open the docs/index.md document in your text editor of choice, change the\ninitial heading to MkLorum, and save your changes. Your browser will\nauto-reload and you should see your updated documentation immediately.

\n

Now try editing the configuration file: mkdocs.yml. Change the\nsite_name setting to MkLorum and save the file.

\n
site_name: MkLorum\n
\n\n

Your browser should immediately reload, and you'll see your new site name take\neffect.

\n

\"The

\n

Adding pages\uf0c1

\n

Now add a second page to your documentation:

\n
curl 'https://jaspervdj.be/lorem-markdownum/markdown.txt' > docs/about.md\n
\n\n

As our documentation site will include some navigation headers, you may want to\nedit the configuration file and add some information about the order, title, and\nnesting of each page in the navigation header by adding a pages\nsetting:

\n
site_name: MkLorum\npages:\n    - Home: index.md\n    - About: about.md\n
\n\n

Save your changes and you'll now see a navigation bar with Home and About\nitems on the left as well as Search, Previous, and Next items on the\nright.

\n

\"Screenshot\"

\n

Try the menu items and navigate back and forth between pages. Then click on\nSearch. A search dialog will appear, allowing you to search for any text on\nany page. Notice that the search results include every occurrence of the search\nterm on the site and links directly to the section of the page in which the\nsearch term appears. You get of all that with no effort or configuration on your\npart!

\n

\"Screenshot\"

\n

Theming our documentation\uf0c1

\n

Now change the configuration file to alter how the documentation is displayed by\nchanging the theme. Edit the mkdocs.yml file and add a theme setting:

\n
site_name: MkLorum\npages:\n    - Home: index.md\n    - About: about.md\ntheme: readthedocs\n
\n\n

Save your changes, and you'll see the ReadTheDocs theme being used.

\n

\"Screenshot\"

\n

Changing the Favicon Icon\uf0c1

\n

By default, MkDocs uses the MkDocs favicon icon. To use a different icon, create\nan img subdirectory in your docs_dir and copy your custom favicon.ico file\nto that directory. MkDocs will automatically detect and use that file as your\nfavicon icon.

\n

Building the site\uf0c1

\n

That's looking good. You're ready to deploy the first pass of your MkLorum\ndocumentation. First build the documentation:

\n
mkdocs build\n
\n\n

This will create a new directory, named site. Take a look inside the\ndirectory:

\n
$ ls site\nabout  fonts  index.html  license  search.html\ncss    img    js          mkdocs   sitemap.xml\n
\n\n

Notice that your source documentation has been output as two HTML files named\nindex.html and about/index.html. You also have various other media that's\nbeen copied into the site directory as part of the documentation theme. You\neven have a sitemap.xml file and mkdocs/search_index.json.

\n

If you're using source code control such as git you probably don't want to\ncheck your documentation builds into the repository. Add a line containing\nsite/ to your .gitignore file.

\n
echo "site/" >> .gitignore\n
\n\n

If you're using another source code control tool you'll want to check its\ndocumentation on how to ignore specific directories.

\n

After some time, files may be removed from the documentation but they will still\nreside in the site directory. To remove those stale files, just run mkdocs\nwith the --clean switch.

\n
mkdocs build --clean\n
\n\n

Other Commands and Options\uf0c1

\n

There are various other commands and options available. For a complete list of\ncommands, use the --help flag:

\n
mkdocs --help\n
\n\n

To view a list of options available on a given command, use the --help flag\nwith that command. For example, to get a list of all options available for the\nbuild command run the following:

\n
mkdocs build --help\n
\n\n

Deploying\uf0c1

\n

The documentation site that you just built only uses static files so you'll be\nable to host it from pretty much anywhere. GitHub project pages and Amazon\nS3 may be good hosting options, depending upon your needs. Upload the contents\nof the entire site directory to wherever you're hosting your website from and\nyou're done. For specific instructions on a number of common hosts, see the\nDeploying your Docs page.

\n

Getting help\uf0c1

\n

To get help with MkDocs, please use the discussion group, GitHub issues or\nthe MkDocs IRC channel #mkdocs on freenode.

", + "url": "/", + "language": "en", "title": "Home" } \ No newline at end of file diff --git a/readthedocs/organizations/tests/test_privacy_urls.py b/readthedocs/organizations/tests/test_privacy_urls.py index e9109f33bf2..37120b6891d 100644 --- a/readthedocs/organizations/tests/test_privacy_urls.py +++ b/readthedocs/organizations/tests/test_privacy_urls.py @@ -35,7 +35,7 @@ def get_url_path_ctx(self): class NoOrganizationsTest(OrganizationMixin, TestCase): """Organization views aren't available if organizations aren't allowed.""" - + default_status_code = 404 def login(self): diff --git a/readthedocs/search/tests/data/mkdocs/in/mkdocs-1.1/configuration.html b/readthedocs/search/tests/data/mkdocs/in/mkdocs-1.1/configuration.html index 93e3475efe0..a27967bfd9f 100644 --- a/readthedocs/search/tests/data/mkdocs/in/mkdocs-1.1/configuration.html +++ b/readthedocs/search/tests/data/mkdocs/in/mkdocs-1.1/configuration.html @@ -22,7 +22,7 @@ - + From eb53aa6c08283d58808fb06f64999ba0f44097fb Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 8 Mar 2023 20:58:03 +0100 Subject: [PATCH 08/13] Lint: end-of-file fixes --- readthedocs/config/tests/test_yaml_loader.py | 1 - readthedocs/embed/tests/data/mkdocs/latest/index.json | 2 +- readthedocs/projects/tests/test_docker_environment.py | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/readthedocs/config/tests/test_yaml_loader.py b/readthedocs/config/tests/test_yaml_loader.py index 89cf53dff30..4dd59286c61 100644 --- a/readthedocs/config/tests/test_yaml_loader.py +++ b/readthedocs/config/tests/test_yaml_loader.py @@ -35,4 +35,3 @@ def test_yaml_load_safely(): def test_yaml_dump_safely(): data = yaml_load_safely(content) assert yaml_load_safely(yaml_dump_safely(data)) == data - diff --git a/readthedocs/embed/tests/data/mkdocs/latest/index.json b/readthedocs/embed/tests/data/mkdocs/latest/index.json index 86645917a43..bdc20985c85 100644 --- a/readthedocs/embed/tests/data/mkdocs/latest/index.json +++ b/readthedocs/embed/tests/data/mkdocs/latest/index.json @@ -3,4 +3,4 @@ "url": "/", "language": "en", "title": "Home" -} \ No newline at end of file +} diff --git a/readthedocs/projects/tests/test_docker_environment.py b/readthedocs/projects/tests/test_docker_environment.py index 2779726a9e8..3ea6f42d608 100644 --- a/readthedocs/projects/tests/test_docker_environment.py +++ b/readthedocs/projects/tests/test_docker_environment.py @@ -35,4 +35,3 @@ def setup(self, requests_mock): def test_container_id(self): assert self.environment.container_id == f'build-{self.build.pk}-project-{self.project.pk}-{self.project.slug}' - From 65d1054a6ab7892f3199d317cdafe2324790ba65 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 8 Mar 2023 21:02:17 +0100 Subject: [PATCH 09/13] Lint: typo --- readthedocs/builds/apps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs/builds/apps.py b/readthedocs/builds/apps.py index c316b01fd92..34dbfac4f9b 100644 --- a/readthedocs/builds/apps.py +++ b/readthedocs/builds/apps.py @@ -11,4 +11,4 @@ class Config(AppConfig): verbose_name = _("Builds") def ready(self): - import readthedocs.builds.task # noqa + import readthedocs.builds.tasks # noqa From b8db94737309b17f72ad22666ae9514aa274cf42 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 8 Mar 2023 21:07:56 +0100 Subject: [PATCH 10/13] Lint: darker over modified files --- readthedocs/api/v3/renderers.py | 6 +----- .../builds/migrations/0007_add-automation-rules.py | 4 +--- .../builds/migrations/0008_remove-version-tags.py | 2 -- .../migrations/0009_added_external_version_type.py | 2 -- .../0010_add-description-field-to-automation-rule.py | 2 -- .../migrations/0011_version-media-availability.py | 2 -- .../migrations/0012_add-predefined-match-arg-field.py | 2 -- .../migrations/0013_version_documentation_type.py | 2 -- readthedocs/config/tests/test_yaml_loader.py | 2 +- .../migrations/0006_remove_userprofile_allow_email.py | 2 -- readthedocs/core/tests/test_contact.py | 11 +++++------ readthedocs/doc_builder/signals.py | 1 - readthedocs/embed/v3/tests/test_basics.py | 2 -- readthedocs/gold/tests/test_signals.py | 3 ++- readthedocs/gold/urls.py | 1 - .../migrations/0004_add_integration_secret.py | 2 -- .../0005_change_default_integration_secret.py | 3 +-- .../0006_set-default-value-provider-data.py | 4 +--- .../migrations/0007_update-provider-data.py | 2 -- readthedocs/notifications/constants.py | 1 - readthedocs/notifications/storages.py | 1 - readthedocs/oauth/migrations/0003_move_github.py | 3 +-- readthedocs/oauth/services/__init__.py | 7 ------- .../0021_add-webhook-deprecation-feature.py | 1 - .../migrations/0027_remove_json_with_html_feature.py | 1 - readthedocs/projects/migrations/0037_add_htmlfile.py | 2 -- .../0038_change-default-python-interpreter.py | 2 -- .../migrations/0039_update-doctype-helptext.py | 2 -- .../migrations/0040_increase_path_max_length.py | 2 -- .../projects/migrations/0041_index-repo-field.py | 3 +-- .../0042_increase_env_variable_value_max_length.py | 2 -- .../projects/migrations/0043_add-build-field.py | 2 -- .../projects/migrations/0044_auto_20190703_1300.py | 2 -- readthedocs/projects/notifications.py | 4 ++-- readthedocs/projects/tests/test_docker_environment.py | 3 +-- .../0003_add_default_redirect_http_status_to_302.py | 2 -- .../redirects/migrations/0004_denormalize-from-url.py | 2 -- readthedocs/rtd_tests/files/conf.py | 2 -- readthedocs/rtd_tests/mocks/paths.py | 1 - .../rtd_tests/tests/projects/test_admin_actions.py | 3 ++- readthedocs/rtd_tests/tests/test_backend_svn.py | 1 - readthedocs/rtd_tests/tests/test_build_config.py | 1 - readthedocs/rtd_tests/tests/test_extend.py | 5 +---- .../rtd_tests/tests/test_version_commit_name.py | 8 +------- readthedocs/search/migrations/0001_initial.py | 4 +--- readthedocs/search/signals.py | 1 - readthedocs/sphinx_domains/migrations/0001_initial.py | 4 +--- .../migrations/0002_increase_max_length.py | 2 -- .../migrations/0003_additional_indexed_fields.py | 2 -- .../sphinx_domains/migrations/0004_add-build-field.py | 2 -- .../0005_htmlfile-sphinx-domain-integration.py | 4 +--- 51 files changed, 24 insertions(+), 113 deletions(-) diff --git a/readthedocs/api/v3/renderers.py b/readthedocs/api/v3/renderers.py index 31e65116dd7..62e3828bcb2 100644 --- a/readthedocs/api/v3/renderers.py +++ b/readthedocs/api/v3/renderers.py @@ -1,10 +1,6 @@ import json -from rest_framework.compat import ( - INDENT_SEPARATORS, - LONG_SEPARATORS, - SHORT_SEPARATORS, -) +from rest_framework.compat import INDENT_SEPARATORS, LONG_SEPARATORS, SHORT_SEPARATORS from rest_framework.renderers import JSONRenderer diff --git a/readthedocs/builds/migrations/0007_add-automation-rules.py b/readthedocs/builds/migrations/0007_add-automation-rules.py index 9b44c04312c..93530cc70c9 100644 --- a/readthedocs/builds/migrations/0007_add-automation-rules.py +++ b/readthedocs/builds/migrations/0007_add-automation-rules.py @@ -1,9 +1,7 @@ # Generated by Django 1.11.20 on 2019-04-25 23:04 -from __future__ import unicode_literals - -from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields +from django.db import migrations, models class Migration(migrations.Migration): diff --git a/readthedocs/builds/migrations/0008_remove-version-tags.py b/readthedocs/builds/migrations/0008_remove-version-tags.py index 8778927553c..67903a98bcc 100644 --- a/readthedocs/builds/migrations/0008_remove-version-tags.py +++ b/readthedocs/builds/migrations/0008_remove-version-tags.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.20 on 2019-06-28 16:29 -from __future__ import unicode_literals - from django.db import migrations diff --git a/readthedocs/builds/migrations/0009_added_external_version_type.py b/readthedocs/builds/migrations/0009_added_external_version_type.py index 482969209ac..68056b73d1d 100644 --- a/readthedocs/builds/migrations/0009_added_external_version_type.py +++ b/readthedocs/builds/migrations/0009_added_external_version_type.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.21 on 2019-07-04 13:10 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/builds/migrations/0010_add-description-field-to-automation-rule.py b/readthedocs/builds/migrations/0010_add-description-field-to-automation-rule.py index 7779271a901..47724aae4d8 100644 --- a/readthedocs/builds/migrations/0010_add-description-field-to-automation-rule.py +++ b/readthedocs/builds/migrations/0010_add-description-field-to-automation-rule.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.22 on 2019-07-25 17:24 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/builds/migrations/0011_version-media-availability.py b/readthedocs/builds/migrations/0011_version-media-availability.py index 6b86139e516..e5a85f219ef 100644 --- a/readthedocs/builds/migrations/0011_version-media-availability.py +++ b/readthedocs/builds/migrations/0011_version-media-availability.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.23 on 2019-10-07 23:32 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/builds/migrations/0012_add-predefined-match-arg-field.py b/readthedocs/builds/migrations/0012_add-predefined-match-arg-field.py index 0e1d4279b83..c9bb216ee22 100644 --- a/readthedocs/builds/migrations/0012_add-predefined-match-arg-field.py +++ b/readthedocs/builds/migrations/0012_add-predefined-match-arg-field.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.25 on 2019-11-05 23:54 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/builds/migrations/0013_version_documentation_type.py b/readthedocs/builds/migrations/0013_version_documentation_type.py index 53f0abd569d..86d80231b42 100644 --- a/readthedocs/builds/migrations/0013_version_documentation_type.py +++ b/readthedocs/builds/migrations/0013_version_documentation_type.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.27 on 2020-01-14 17:37 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/config/tests/test_yaml_loader.py b/readthedocs/config/tests/test_yaml_loader.py index 4dd59286c61..463562c79c3 100644 --- a/readthedocs/config/tests/test_yaml_loader.py +++ b/readthedocs/config/tests/test_yaml_loader.py @@ -1,7 +1,7 @@ from readthedocs.doc_builder.backends.mkdocs import ( + ProxyPythonName, yaml_dump_safely, yaml_load_safely, - ProxyPythonName ) content = ''' diff --git a/readthedocs/core/migrations/0006_remove_userprofile_allow_email.py b/readthedocs/core/migrations/0006_remove_userprofile_allow_email.py index e82989e41f4..96697a2e6bb 100644 --- a/readthedocs/core/migrations/0006_remove_userprofile_allow_email.py +++ b/readthedocs/core/migrations/0006_remove_userprofile_allow_email.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.20 on 2019-03-01 17:30 -from __future__ import unicode_literals - from django.db import migrations diff --git a/readthedocs/core/tests/test_contact.py b/readthedocs/core/tests/test_contact.py index 97cc37f32cf..88bfb39c96d 100644 --- a/readthedocs/core/tests/test_contact.py +++ b/readthedocs/core/tests/test_contact.py @@ -10,14 +10,13 @@ User = get_user_model() class TestContactUsers(TestCase): - def setUp(self): - self.user = get(User, username='test', email='one@test.com') - self.user_two = get(User, username='test2', email='two@test.com') - self.user_three = get(User, username='test3', email='three@test.com') + self.user = get(User, username="test", email="one@test.com") + self.user_two = get(User, username="test2", email="two@test.com") + self.user_three = get(User, username="test3", email="three@test.com") - @mock.patch('readthedocs.core.utils.contact.send_mail') - @mock.patch.object(SiteBackend, 'send') + @mock.patch("readthedocs.core.utils.contact.send_mail") + @mock.patch.object(SiteBackend, "send") def test_contact_users_dryrun(self, send_notification, send_mail): self.assertEqual(User.objects.all().count(), 3) resp = contact_users( diff --git a/readthedocs/doc_builder/signals.py b/readthedocs/doc_builder/signals.py index 3e064366962..d47392beb6b 100644 --- a/readthedocs/doc_builder/signals.py +++ b/readthedocs/doc_builder/signals.py @@ -3,5 +3,4 @@ import django.dispatch - finalize_sphinx_context_data = django.dispatch.Signal() diff --git a/readthedocs/embed/v3/tests/test_basics.py b/readthedocs/embed/v3/tests/test_basics.py index a50c24801e3..856451d9da2 100644 --- a/readthedocs/embed/v3/tests/test_basics.py +++ b/readthedocs/embed/v3/tests/test_basics.py @@ -1,11 +1,9 @@ import pytest - from django.conf import settings from django.core.cache import cache from django.urls import reverse - @pytest.mark.django_db @pytest.mark.embed_api class TestEmbedAPIv3Basics: diff --git a/readthedocs/gold/tests/test_signals.py b/readthedocs/gold/tests/test_signals.py index c2d406c4afc..9b579edae33 100644 --- a/readthedocs/gold/tests/test_signals.py +++ b/readthedocs/gold/tests/test_signals.py @@ -1,5 +1,6 @@ -import django_dynamic_fixture as fixture from unittest import mock + +import django_dynamic_fixture as fixture from django.contrib.auth.models import User from django.test import TestCase diff --git a/readthedocs/gold/urls.py b/readthedocs/gold/urls.py index 95c492059d0..fd3cd4df920 100644 --- a/readthedocs/gold/urls.py +++ b/readthedocs/gold/urls.py @@ -6,7 +6,6 @@ from readthedocs.gold import views from readthedocs.projects.constants import PROJECT_SLUG_REGEX - urlpatterns = [ re_path( r'^$', diff --git a/readthedocs/integrations/migrations/0004_add_integration_secret.py b/readthedocs/integrations/migrations/0004_add_integration_secret.py index eb3f2c98851..51a2c3f90ec 100644 --- a/readthedocs/integrations/migrations/0004_add_integration_secret.py +++ b/readthedocs/integrations/migrations/0004_add_integration_secret.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.16 on 2018-12-10 21:28 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/integrations/migrations/0005_change_default_integration_secret.py b/readthedocs/integrations/migrations/0005_change_default_integration_secret.py index 58246650ff2..06cd6e78eff 100644 --- a/readthedocs/integrations/migrations/0005_change_default_integration_secret.py +++ b/readthedocs/integrations/migrations/0005_change_default_integration_secret.py @@ -1,7 +1,6 @@ # Generated by Django 1.11.16 on 2018-12-10 22:08 -from __future__ import unicode_literals - from django.db import migrations, models + import readthedocs.integrations.utils diff --git a/readthedocs/integrations/migrations/0006_set-default-value-provider-data.py b/readthedocs/integrations/migrations/0006_set-default-value-provider-data.py index 84bfb270f2c..1547a882163 100644 --- a/readthedocs/integrations/migrations/0006_set-default-value-provider-data.py +++ b/readthedocs/integrations/migrations/0006_set-default-value-provider-data.py @@ -1,8 +1,6 @@ # Generated by Django 1.11.27 on 2020-02-17 18:14 -from __future__ import unicode_literals - -from django.db import migrations import jsonfield.fields +from django.db import migrations class Migration(migrations.Migration): diff --git a/readthedocs/integrations/migrations/0007_update-provider-data.py b/readthedocs/integrations/migrations/0007_update-provider-data.py index 543ebcb7782..a619ee79b00 100644 --- a/readthedocs/integrations/migrations/0007_update-provider-data.py +++ b/readthedocs/integrations/migrations/0007_update-provider-data.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.27 on 2020-02-18 19:00 -from __future__ import unicode_literals - from django.db import migrations diff --git a/readthedocs/notifications/constants.py b/readthedocs/notifications/constants.py index e930b3eba54..5b62e8d0b80 100644 --- a/readthedocs/notifications/constants.py +++ b/readthedocs/notifications/constants.py @@ -3,7 +3,6 @@ from messages_extends import constants as message_constants - TEXT = 'txt' HTML = 'html' diff --git a/readthedocs/notifications/storages.py b/readthedocs/notifications/storages.py index a78aeefdb8a..8f16a66c587 100644 --- a/readthedocs/notifications/storages.py +++ b/readthedocs/notifications/storages.py @@ -10,7 +10,6 @@ from .constants import NON_PERSISTENT_MESSAGE_LEVELS - try: from django.utils import timezone except ImportError: diff --git a/readthedocs/oauth/migrations/0003_move_github.py b/readthedocs/oauth/migrations/0003_move_github.py index 02c4f515869..839a1dd1fea 100644 --- a/readthedocs/oauth/migrations/0003_move_github.py +++ b/readthedocs/oauth/migrations/0003_move_github.py @@ -1,10 +1,9 @@ import gc import json -import structlog +import structlog from django.db import migrations - log = structlog.get_logger(__name__) diff --git a/readthedocs/oauth/services/__init__.py b/readthedocs/oauth/services/__init__.py index 7b635947633..87cdca3bd1c 100644 --- a/readthedocs/oauth/services/__init__.py +++ b/readthedocs/oauth/services/__init__.py @@ -1,13 +1,6 @@ """Conditional classes for OAuth services.""" -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) - from readthedocs.core.utils.extend import SettingsOverrideObject from readthedocs.oauth.services import bitbucket, github, gitlab diff --git a/readthedocs/projects/migrations/0021_add-webhook-deprecation-feature.py b/readthedocs/projects/migrations/0021_add-webhook-deprecation-feature.py index 6e0acb7d707..f75e8eeba3f 100644 --- a/readthedocs/projects/migrations/0021_add-webhook-deprecation-feature.py +++ b/readthedocs/projects/migrations/0021_add-webhook-deprecation-feature.py @@ -3,7 +3,6 @@ from django.db import migrations - FEATURE_ID = 'allow_deprecated_webhooks' diff --git a/readthedocs/projects/migrations/0027_remove_json_with_html_feature.py b/readthedocs/projects/migrations/0027_remove_json_with_html_feature.py index 372b18da01e..9b9fcafa34b 100644 --- a/readthedocs/projects/migrations/0027_remove_json_with_html_feature.py +++ b/readthedocs/projects/migrations/0027_remove_json_with_html_feature.py @@ -1,7 +1,6 @@ # Generated by Django 1.9.13 on 2018-08-22 09:19 from django.db import migrations - FEATURE_ID = 'build_json_artifacts_with_html' diff --git a/readthedocs/projects/migrations/0037_add_htmlfile.py b/readthedocs/projects/migrations/0037_add_htmlfile.py index ddce7a3b1c3..8d82307f607 100644 --- a/readthedocs/projects/migrations/0037_add_htmlfile.py +++ b/readthedocs/projects/migrations/0037_add_htmlfile.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.18 on 2019-01-22 19:13 -from __future__ import unicode_literals - from django.db import migrations diff --git a/readthedocs/projects/migrations/0038_change-default-python-interpreter.py b/readthedocs/projects/migrations/0038_change-default-python-interpreter.py index 2a99de22266..4f8f1c7d813 100644 --- a/readthedocs/projects/migrations/0038_change-default-python-interpreter.py +++ b/readthedocs/projects/migrations/0038_change-default-python-interpreter.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.18 on 2019-02-04 16:49 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0039_update-doctype-helptext.py b/readthedocs/projects/migrations/0039_update-doctype-helptext.py index 2a8e1b14a0e..c0347086ba9 100644 --- a/readthedocs/projects/migrations/0039_update-doctype-helptext.py +++ b/readthedocs/projects/migrations/0039_update-doctype-helptext.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.18 on 2019-02-02 19:45 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0040_increase_path_max_length.py b/readthedocs/projects/migrations/0040_increase_path_max_length.py index dc67a927e1f..44721375309 100644 --- a/readthedocs/projects/migrations/0040_increase_path_max_length.py +++ b/readthedocs/projects/migrations/0040_increase_path_max_length.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.20 on 2019-02-23 15:05 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0041_index-repo-field.py b/readthedocs/projects/migrations/0041_index-repo-field.py index 479bd11fc3b..98c5885e415 100644 --- a/readthedocs/projects/migrations/0041_index-repo-field.py +++ b/readthedocs/projects/migrations/0041_index-repo-field.py @@ -1,7 +1,6 @@ # Generated by Django 1.11.20 on 2019-03-13 17:03 -from __future__ import unicode_literals - from django.db import migrations, models + import readthedocs.projects.validators diff --git a/readthedocs/projects/migrations/0042_increase_env_variable_value_max_length.py b/readthedocs/projects/migrations/0042_increase_env_variable_value_max_length.py index 49f9ee292cb..aca1dbc56db 100644 --- a/readthedocs/projects/migrations/0042_increase_env_variable_value_max_length.py +++ b/readthedocs/projects/migrations/0042_increase_env_variable_value_max_length.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.20 on 2019-04-16 18:43 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0043_add-build-field.py b/readthedocs/projects/migrations/0043_add-build-field.py index 9ed5a706ae8..58c9f99a8ee 100644 --- a/readthedocs/projects/migrations/0043_add-build-field.py +++ b/readthedocs/projects/migrations/0043_add-build-field.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.21 on 2019-06-13 18:03 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/projects/migrations/0044_auto_20190703_1300.py b/readthedocs/projects/migrations/0044_auto_20190703_1300.py index 3bb96ce2887..39f9da0fea7 100644 --- a/readthedocs/projects/migrations/0044_auto_20190703_1300.py +++ b/readthedocs/projects/migrations/0044_auto_20190703_1300.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.21 on 2019-07-03 13:00 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/projects/notifications.py b/readthedocs/projects/notifications.py index 2ec32b9bebe..67432a9fbe5 100644 --- a/readthedocs/projects/notifications.py +++ b/readthedocs/projects/notifications.py @@ -1,12 +1,12 @@ """Project notifications.""" -from django.urls import reverse from django.http import HttpRequest +from django.urls import reverse from django.utils.translation import gettext_lazy as _ from messages_extends.constants import ERROR_PERSISTENT -from readthedocs.core.permissions import AdminPermission +from readthedocs.core.permissions import AdminPermission from readthedocs.notifications import Notification, SiteNotification from readthedocs.notifications.constants import REQUIREMENT diff --git a/readthedocs/projects/tests/test_docker_environment.py b/readthedocs/projects/tests/test_docker_environment.py index 3ea6f42d608..da677747405 100644 --- a/readthedocs/projects/tests/test_docker_environment.py +++ b/readthedocs/projects/tests/test_docker_environment.py @@ -1,7 +1,6 @@ -import pytest import django_dynamic_fixture as fixture - +import pytest from readthedocs.builds.models import Build from readthedocs.doc_builder.environments import DockerBuildEnvironment diff --git a/readthedocs/redirects/migrations/0003_add_default_redirect_http_status_to_302.py b/readthedocs/redirects/migrations/0003_add_default_redirect_http_status_to_302.py index 3823bb00c2e..d92da06047c 100644 --- a/readthedocs/redirects/migrations/0003_add_default_redirect_http_status_to_302.py +++ b/readthedocs/redirects/migrations/0003_add_default_redirect_http_status_to_302.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.20 on 2019-05-23 15:25 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/redirects/migrations/0004_denormalize-from-url.py b/readthedocs/redirects/migrations/0004_denormalize-from-url.py index 32d9c98fefe..0ab09316a15 100644 --- a/readthedocs/redirects/migrations/0004_denormalize-from-url.py +++ b/readthedocs/redirects/migrations/0004_denormalize-from-url.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.26 on 2020-03-14 14:15 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/rtd_tests/files/conf.py b/readthedocs/rtd_tests/files/conf.py index 9acb38beef3..f08e34d17d8 100644 --- a/readthedocs/rtd_tests/files/conf.py +++ b/readthedocs/rtd_tests/files/conf.py @@ -1,6 +1,4 @@ -from __future__ import division, print_function, unicode_literals - from datetime import datetime from recommonmark.parser import CommonMarkParser diff --git a/readthedocs/rtd_tests/mocks/paths.py b/readthedocs/rtd_tests/mocks/paths.py index 752507b4505..fd7c62298e2 100644 --- a/readthedocs/rtd_tests/mocks/paths.py +++ b/readthedocs/rtd_tests/mocks/paths.py @@ -1,7 +1,6 @@ """Context managers to patch os.path.exists calls.""" import os import re - from unittest import mock diff --git a/readthedocs/rtd_tests/tests/projects/test_admin_actions.py b/readthedocs/rtd_tests/tests/projects/test_admin_actions.py index 9627c76033e..14c8b222c4f 100644 --- a/readthedocs/rtd_tests/tests/projects/test_admin_actions.py +++ b/readthedocs/rtd_tests/tests/projects/test_admin_actions.py @@ -1,5 +1,6 @@ -import django_dynamic_fixture as fixture from unittest import mock + +import django_dynamic_fixture as fixture from django import urls from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME from django.contrib.auth.models import User diff --git a/readthedocs/rtd_tests/tests/test_backend_svn.py b/readthedocs/rtd_tests/tests/test_backend_svn.py index fae5c9de7d9..9be4505f3c0 100644 --- a/readthedocs/rtd_tests/tests/test_backend_svn.py +++ b/readthedocs/rtd_tests/tests/test_backend_svn.py @@ -1,7 +1,6 @@ """Tests For SVN.""" from django.test import TestCase - from django_dynamic_fixture import get from readthedocs.builds.models import Version diff --git a/readthedocs/rtd_tests/tests/test_build_config.py b/readthedocs/rtd_tests/tests/test_build_config.py index 2196ec381ee..b501be50e39 100644 --- a/readthedocs/rtd_tests/tests/test_build_config.py +++ b/readthedocs/rtd_tests/tests/test_build_config.py @@ -6,7 +6,6 @@ from readthedocs.config.tests import utils - V2_SCHEMA = path.join( path.dirname(__file__), '../fixtures/spec/v2/schema.yml', diff --git a/readthedocs/rtd_tests/tests/test_extend.py b/readthedocs/rtd_tests/tests/test_extend.py index 44163eae043..7862c3a7c32 100644 --- a/readthedocs/rtd_tests/tests/test_extend.py +++ b/readthedocs/rtd_tests/tests/test_extend.py @@ -1,9 +1,6 @@ from django.test import TestCase, override_settings -from readthedocs.core.utils.extend import ( - SettingsOverrideObject, - get_override_class, -) +from readthedocs.core.utils.extend import SettingsOverrideObject, get_override_class # Top level to ensure module name is correct diff --git a/readthedocs/rtd_tests/tests/test_version_commit_name.py b/readthedocs/rtd_tests/tests/test_version_commit_name.py index 473852d44a5..027e3fb309f 100644 --- a/readthedocs/rtd_tests/tests/test_version_commit_name.py +++ b/readthedocs/rtd_tests/tests/test_version_commit_name.py @@ -1,13 +1,7 @@ from django.test import TestCase from django_dynamic_fixture import get, new -from readthedocs.builds.constants import ( - BRANCH, - LATEST, - STABLE, - TAG, - EXTERNAL, -) +from readthedocs.builds.constants import BRANCH, EXTERNAL, LATEST, STABLE, TAG from readthedocs.builds.models import Version from readthedocs.projects.constants import REPO_TYPE_GIT, REPO_TYPE_HG from readthedocs.projects.models import Project diff --git a/readthedocs/search/migrations/0001_initial.py b/readthedocs/search/migrations/0001_initial.py index 790b6c10412..a9dce14aa0d 100644 --- a/readthedocs/search/migrations/0001_initial.py +++ b/readthedocs/search/migrations/0001_initial.py @@ -1,9 +1,7 @@ # Generated by Django 1.11.22 on 2019-08-01 13:57 -from __future__ import unicode_literals - -from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields +from django.db import migrations, models class Migration(migrations.Migration): diff --git a/readthedocs/search/signals.py b/readthedocs/search/signals.py index 74480c95598..c94ae95cc1f 100644 --- a/readthedocs/search/signals.py +++ b/readthedocs/search/signals.py @@ -1,6 +1,5 @@ """We define custom Django signals to trigger before executing searches.""" import structlog - from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from django_elasticsearch_dsl.apps import DEDConfig diff --git a/readthedocs/sphinx_domains/migrations/0001_initial.py b/readthedocs/sphinx_domains/migrations/0001_initial.py index f083ce22522..19b2bbef34c 100644 --- a/readthedocs/sphinx_domains/migrations/0001_initial.py +++ b/readthedocs/sphinx_domains/migrations/0001_initial.py @@ -1,9 +1,7 @@ # Generated by Django 1.11.20 on 2019-02-27 16:23 -from __future__ import unicode_literals - -from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields +from django.db import migrations, models class Migration(migrations.Migration): diff --git a/readthedocs/sphinx_domains/migrations/0002_increase_max_length.py b/readthedocs/sphinx_domains/migrations/0002_increase_max_length.py index 3ae40d3f8a7..8901f8d3a01 100644 --- a/readthedocs/sphinx_domains/migrations/0002_increase_max_length.py +++ b/readthedocs/sphinx_domains/migrations/0002_increase_max_length.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.20 on 2019-02-27 16:50 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/sphinx_domains/migrations/0003_additional_indexed_fields.py b/readthedocs/sphinx_domains/migrations/0003_additional_indexed_fields.py index 40ed6d516fc..dafc3c53c4d 100644 --- a/readthedocs/sphinx_domains/migrations/0003_additional_indexed_fields.py +++ b/readthedocs/sphinx_domains/migrations/0003_additional_indexed_fields.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.20 on 2019-03-01 14:25 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/sphinx_domains/migrations/0004_add-build-field.py b/readthedocs/sphinx_domains/migrations/0004_add-build-field.py index 4d06d7b9847..dcb6f47ce6d 100644 --- a/readthedocs/sphinx_domains/migrations/0004_add-build-field.py +++ b/readthedocs/sphinx_domains/migrations/0004_add-build-field.py @@ -1,6 +1,4 @@ # Generated by Django 1.11.21 on 2019-06-13 18:03 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/readthedocs/sphinx_domains/migrations/0005_htmlfile-sphinx-domain-integration.py b/readthedocs/sphinx_domains/migrations/0005_htmlfile-sphinx-domain-integration.py index 754c05e7288..4c1b5d010a9 100644 --- a/readthedocs/sphinx_domains/migrations/0005_htmlfile-sphinx-domain-integration.py +++ b/readthedocs/sphinx_domains/migrations/0005_htmlfile-sphinx-domain-integration.py @@ -1,8 +1,6 @@ # Generated by Django 1.11.20 on 2019-06-25 23:18 -from __future__ import unicode_literals - -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): From c567811d9650b58d7d6c49c0401c92b52276ace8 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 8 Mar 2023 21:16:09 +0100 Subject: [PATCH 11/13] Lint: add some missing docstrings --- readthedocs/api/v3/renderers.py | 2 ++ readthedocs/builds/apps.py | 2 ++ readthedocs/core/static.py | 7 +++++++ readthedocs/search/signals.py | 2 ++ 4 files changed, 13 insertions(+) diff --git a/readthedocs/api/v3/renderers.py b/readthedocs/api/v3/renderers.py index 62e3828bcb2..1d6b68eaa2f 100644 --- a/readthedocs/api/v3/renderers.py +++ b/readthedocs/api/v3/renderers.py @@ -1,3 +1,5 @@ +"""Renders with some extra capabilities we require for our own purposes.""" + import json from rest_framework.compat import INDENT_SEPARATORS, LONG_SEPARATORS, SHORT_SEPARATORS diff --git a/readthedocs/builds/apps.py b/readthedocs/builds/apps.py index 34dbfac4f9b..add1609dad5 100644 --- a/readthedocs/builds/apps.py +++ b/readthedocs/builds/apps.py @@ -1,3 +1,5 @@ +"""Django configuration for readthedocs.builds application.""" + import structlog from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ diff --git a/readthedocs/core/static.py b/readthedocs/core/static.py index e1fb22afcd9..934f40c666f 100644 --- a/readthedocs/core/static.py +++ b/readthedocs/core/static.py @@ -1,3 +1,10 @@ +""" +Read the Docs custom static finders. + +NOTE: I think we can probably remove it completely, +since we are not storing these files anymore inside "media/" +""" + from django.contrib.staticfiles.finders import FileSystemFinder diff --git a/readthedocs/search/signals.py b/readthedocs/search/signals.py index c94ae95cc1f..7d3f8096922 100644 --- a/readthedocs/search/signals.py +++ b/readthedocs/search/signals.py @@ -1,4 +1,5 @@ """We define custom Django signals to trigger before executing searches.""" + import structlog from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver @@ -10,6 +11,7 @@ log = structlog.get_logger(__name__) +# pylint: disable=unused-argument @receiver(post_save, sender=Project) def index_project_save(instance, *args, **kwargs): """ From 0d4992bd9067e48f1082a650a03e319d7a7ecd6f Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 8 Mar 2023 21:33:25 +0100 Subject: [PATCH 12/13] Lint: keep this file as is, since it's used in tests --- readthedocs/rtd_tests/files/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readthedocs/rtd_tests/files/conf.py b/readthedocs/rtd_tests/files/conf.py index f08e34d17d8..4007dcfab19 100644 --- a/readthedocs/rtd_tests/files/conf.py +++ b/readthedocs/rtd_tests/files/conf.py @@ -1,3 +1,6 @@ +# -*- coding: utf-8 -*- + +from __future__ import division, print_function, unicode_literals from datetime import datetime From 4329d2671c26d0afc24e25396f758d4fb2a1e40f Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 8 Mar 2023 21:36:39 +0100 Subject: [PATCH 13/13] pre-commit: update common to update changes --- common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common b/common index d1ba049eaac..ec23298a267 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit d1ba049eaac43ece35953a7755162a2d51c9e6f8 +Subproject commit ec23298a26723cb5c106d36f5e4014898a7ae75d