From 929d3abf11420d300786a0a60fe799ca652d57b7 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 7 Mar 2024 18:01:27 -0500 Subject: [PATCH 01/10] Add codespell config to setup.cfg --- setup.cfg | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.cfg b/setup.cfg index a29bb27bd25..faf8f450001 100644 --- a/setup.cfg +++ b/setup.cfg @@ -44,3 +44,12 @@ docs/conf.py = version = "{version}" readthedocs/__init__.py = __version__ = "{version}" + +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = .git,*.svg,locale,package-lock.json,*.css,*.min.*,vendor,*.ai +check-hidden = true +# some names and abbreviations and very long lines (minimized?) +ignore-regex = \b(Manuel|DED|Wile E. Coyote)\b|.{300,}|"pyton\b +# TODO: fix syntaxt -- would require transition? +ignore-words-list = fo,te,astroid,requestor,syntaxt From 2c09edad35c23a9d33eeb303dc6e979f93edd4d6 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 7 Mar 2024 18:14:58 -0500 Subject: [PATCH 02/10] Add leftover skips for codespell --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index faf8f450001..5fe63ff4941 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,9 +47,9 @@ readthedocs/__init__.py = [codespell] # Ref: https://github.com/codespell-project/codespell#using-a-config-file -skip = .git,*.svg,locale,package-lock.json,*.css,*.min.*,vendor,*.ai +skip = .git,*.svg,locale,package-lock.json,*.css,*.min.*,vendor,*.ai,setup.cfg check-hidden = true # some names and abbreviations and very long lines (minimized?) -ignore-regex = \b(Manuel|DED|Wile E. Coyote)\b|.{300,}|"pyton\b +ignore-regex = \b(Manuel|DED|Wile E. Coyote|Couldn\\u2019t)\b|.{300,}|"pyton\b|\|(ative|ment)\||"Hel" will match\b|ative: '' # TODO: fix syntaxt -- would require transition? ignore-words-list = fo,te,astroid,requestor,syntaxt From 1861f9f028969919218b777d46df7c90b9262779 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 8 Mar 2024 17:53:25 -0500 Subject: [PATCH 03/10] Do not codespell migrations --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 5fe63ff4941..5ca1635c7f0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,7 +47,7 @@ readthedocs/__init__.py = [codespell] # Ref: https://github.com/codespell-project/codespell#using-a-config-file -skip = .git,*.svg,locale,package-lock.json,*.css,*.min.*,vendor,*.ai,setup.cfg +skip = .git,*.svg,locale,package-lock.json,*.css,*.min.*,vendor,*.ai,setup.cfg,migrations check-hidden = true # some names and abbreviations and very long lines (minimized?) ignore-regex = \b(Manuel|DED|Wile E. Coyote|Couldn\\u2019t)\b|.{300,}|"pyton\b|\|(ative|ment)\||"Hel" will match\b|ative: '' From 14639d13da1aa10144e6a0a860024306969c87d9 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 8 Mar 2024 17:57:02 -0500 Subject: [PATCH 04/10] Ignore "to perfom an" for now --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 5ca1635c7f0..79d14e09fda 100644 --- a/setup.cfg +++ b/setup.cfg @@ -50,6 +50,7 @@ readthedocs/__init__.py = skip = .git,*.svg,locale,package-lock.json,*.css,*.min.*,vendor,*.ai,setup.cfg,migrations check-hidden = true # some names and abbreviations and very long lines (minimized?) -ignore-regex = \b(Manuel|DED|Wile E. Coyote|Couldn\\u2019t)\b|.{300,}|"pyton\b|\|(ative|ment)\||"Hel" will match\b|ative: '' +# TODO: fixup help_text in readthedocs/builds/models.py : "to perfom an" +ignore-regex = \b(Manuel|DED|Wile E. Coyote|Couldn\\u2019t|to perfom an)\b|.{300,}|"pyton\b|\|(ative|ment)\||"Hel" will match\b|ative: '' # TODO: fix syntaxt -- would require transition? ignore-words-list = fo,te,astroid,requestor,syntaxt From a7fa1691aa4c70f45e8196769a7f747b6813a20c Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 24 Jul 2025 10:49:59 -0400 Subject: [PATCH 05/10] Exclude CHANGELOG.rst and help_text files Per https://github.com/readthedocs/readthedocs.org/pull/11195#issuecomment-3113335977 --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 79d14e09fda..f5c3a6c61c4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,10 +47,10 @@ readthedocs/__init__.py = [codespell] # Ref: https://github.com/codespell-project/codespell#using-a-config-file -skip = .git,*.svg,locale,package-lock.json,*.css,*.min.*,vendor,*.ai,setup.cfg,migrations +skip = .git,*.svg,locale,package-lock.json,*.css,*.min.*,vendor,*.ai,setup.cfg,migrations,CHANGELOG.rst check-hidden = true # some names and abbreviations and very long lines (minimized?) # TODO: fixup help_text in readthedocs/builds/models.py : "to perfom an" -ignore-regex = \b(Manuel|DED|Wile E. Coyote|Couldn\\u2019t|to perfom an)\b|.{300,}|"pyton\b|\|(ative|ment)\||"Hel" will match\b|ative: '' +ignore-regex = \b(Manuel|DED|Wile E. Coyote|Couldn\\u2019t|to perfom an)\b|.{300,}|"pyton\b|\|(ative|ment)\||"Hel" will match\b|ative: ''|help_text *=.* # TODO: fix syntaxt -- would require transition? ignore-words-list = fo,te,astroid,requestor,syntaxt From 5ae09d07e8f8a7cb0137ab467c49f2d508b576e4 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 24 Jul 2025 10:56:19 -0400 Subject: [PATCH 06/10] Ignore common/ from codespell --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index f5c3a6c61c4..494f0c41ef8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,7 +47,7 @@ readthedocs/__init__.py = [codespell] # Ref: https://github.com/codespell-project/codespell#using-a-config-file -skip = .git,*.svg,locale,package-lock.json,*.css,*.min.*,vendor,*.ai,setup.cfg,migrations,CHANGELOG.rst +skip = .git,*.svg,locale,package-lock.json,*.css,*.min.*,vendor,*.ai,setup.cfg,migrations,CHANGELOG.rst,common check-hidden = true # some names and abbreviations and very long lines (minimized?) # TODO: fixup help_text in readthedocs/builds/models.py : "to perfom an" From d9599d49a4b4c2ae5e66d63043aad8c1d93047dd Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 24 Jul 2025 10:57:40 -0400 Subject: [PATCH 07/10] Ignore "ore" which seems to be used in examples etc --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 494f0c41ef8..3fbba8c724b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -53,4 +53,4 @@ check-hidden = true # TODO: fixup help_text in readthedocs/builds/models.py : "to perfom an" ignore-regex = \b(Manuel|DED|Wile E. Coyote|Couldn\\u2019t|to perfom an)\b|.{300,}|"pyton\b|\|(ative|ment)\||"Hel" will match\b|ative: ''|help_text *=.* # TODO: fix syntaxt -- would require transition? -ignore-words-list = fo,te,astroid,requestor,syntaxt +ignore-words-list = fo,te,astroid,requestor,syntaxt,ore From 5a5a5f62fe8de26f107716db07d317ac1af9a4c2 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 24 Jul 2025 11:11:46 -0400 Subject: [PATCH 08/10] [DATALAD RUNCMD] chore: run codespell throughout fixing a few typos interactively === Do not change lines below === { "chain": [], "cmd": "codespell -w -i 3 -C 4", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- readthedocs/api/v2/views/model_views.py | 2 +- readthedocs/api/v3/permissions.py | 2 +- readthedocs/core/middleware.py | 2 +- readthedocs/core/utils/__init__.py | 2 +- readthedocs/doc_builder/backends/sphinx.py | 8 ++++---- readthedocs/projects/models.py | 2 +- readthedocs/projects/tasks/builds.py | 2 +- readthedocs/projects/tasks/search.py | 2 +- readthedocs/projects/tests/test_build_tasks.py | 2 +- readthedocs/projects/version_handling.py | 2 +- readthedocs/redirects/querysets.py | 4 ++-- readthedocs/rtd_tests/tests/test_oauth.py | 2 +- readthedocs/settings/base.py | 2 +- readthedocs/storage/rclone.py | 2 +- readthedocs/vcs_support/backends/git.py | 4 ++-- 15 files changed, 20 insertions(+), 20 deletions(-) diff --git a/readthedocs/api/v2/views/model_views.py b/readthedocs/api/v2/views/model_views.py index 911d99d968d..391c25a472a 100644 --- a/readthedocs/api/v2/views/model_views.py +++ b/readthedocs/api/v2/views/model_views.py @@ -452,7 +452,7 @@ class NotificationViewSet(DisableListEndpoint, CreateModelMixin, UserSelectViewS This endpoint is currently used only internally by the builder. Notifications are attached to `Build` objects only when using this endpoint. - This limitation will change in the future when re-implementing this on APIv3 if neeed. + This limitation will change in the future when re-implementing this on APIv3 if needed. """ parser_classes = [JSONParser, MultiPartParser] diff --git a/readthedocs/api/v3/permissions.py b/readthedocs/api/v3/permissions.py index 1e06974705a..18f3bd55a31 100644 --- a/readthedocs/api/v3/permissions.py +++ b/readthedocs/api/v3/permissions.py @@ -8,7 +8,7 @@ class HasEmbedAPIAccess(BasePermission): """ Check if the project being accessed has access to the Embed API. - The embedded API V3 allows getting content from external sites tha + The embedded API V3 allows getting content from external sites that aren't attached to a project. Those sites are restricted to the ones from ``RTD_EMBED_API_EXTERNAL_DOMAINS``, so we just allow that. """ diff --git a/readthedocs/core/middleware.py b/readthedocs/core/middleware.py index 2f0ed9c8cfd..8b71197a49b 100644 --- a/readthedocs/core/middleware.py +++ b/readthedocs/core/middleware.py @@ -14,7 +14,7 @@ class NullCharactersMiddleware: when trying to save the content containing a NULL character into the database, producing a 500 and creating an event in Sentry. - NULL characters are also used as an explotation technique, known as "Null Byte Injection". + NULL characters are also used as an exploitation technique, known as "Null Byte Injection". """ def __init__(self, get_response): diff --git a/readthedocs/core/utils/__init__.py b/readthedocs/core/utils/__init__.py index 9680a646693..a9598bb1c0a 100644 --- a/readthedocs/core/utils/__init__.py +++ b/readthedocs/core/utils/__init__.py @@ -390,7 +390,7 @@ def extract_valid_attributes_for_model(model, attributes): attributes = attributes.copy() valid_field_names = {field.name for field in model._meta.get_fields()} valid_attributes = {} - # We can't change a dictionary while interating over its keys, + # We can't change a dictionary while iterating over its keys, # so we make a copy of its keys. keys = list(attributes.keys()) for key in keys: diff --git a/readthedocs/doc_builder/backends/sphinx.py b/readthedocs/doc_builder/backends/sphinx.py index fb2d6864141..75b823dda67 100644 --- a/readthedocs/doc_builder/backends/sphinx.py +++ b/readthedocs/doc_builder/backends/sphinx.py @@ -44,7 +44,7 @@ def __init__(self, *args, **kwargs): # `absolute_host_output_dir` because it's not defined in the host. So, # we have to re-calculate its value. We will remove this limitation # when we execute the whole building from inside the Docker container - # (instead behing a hybrid as it is now) + # (instead being a hybrid as it is now) # # We need to have two different paths that point to the exact same # directory. How is that? The directory is mounted into a different @@ -95,7 +95,7 @@ def __init__(self, *args, **kwargs): # # IMO, if there are multiple config files, # the build should fail immediately communicating this to the user. - # This can be achived by unhandle the exception here + # This can be achieved by unhandle the exception here # and leaving `on_failure` Celery handle to deal with it. # # In case there is no config file, we should continue the build @@ -152,7 +152,7 @@ def build(self): f"language={language}", # Sphinx's source directory (SOURCEDIR). # We are executing this command at the location of the `conf.py` file (CWD). - # TODO: ideally we should execute it from where the repository was clonned, + # TODO: ideally we should execute it from where the repository was cloned, # but that could lead unexpected behavior to some users: # https://github.com/readthedocs/readthedocs.org/pull/9888#issuecomment-1384649346 ".", @@ -321,7 +321,7 @@ def build(self): f"language={language}", # Sphinx's source directory (SOURCEDIR). # We are executing this command at the location of the `conf.py` file (CWD). - # TODO: ideally we should execute it from where the repository was clonned, + # TODO: ideally we should execute it from where the repository was cloned, # but that could lead unexpected behavior to some users: # https://github.com/readthedocs/readthedocs.org/pull/9888#issuecomment-1384649346 ".", diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py index 7d392f3852a..cb75b094e05 100644 --- a/readthedocs/projects/models.py +++ b/readthedocs/projects/models.py @@ -905,7 +905,7 @@ def get_downloads(self): @property def clean_repo(self): - # NOTE: this method is used only when the project is going to be clonned. + # NOTE: this method is used only when the project is going to be cloned. # It probably makes sense to do a data migrations and force "Import Project" # form to validate it's an HTTPS URL when importing new ones if self.repo.startswith("http://github.com"): diff --git a/readthedocs/projects/tasks/builds.py b/readthedocs/projects/tasks/builds.py index f688171b4d6..7034cea4190 100644 --- a/readthedocs/projects/tasks/builds.py +++ b/readthedocs/projects/tasks/builds.py @@ -789,7 +789,7 @@ def update_build(self, state=None): log.exception("Error while updating the build object.", state=state) def execute(self): - # Clonning + # Cloning self.update_build(state=BUILD_STATE_CLONING) # TODO: remove the ``create_vcs_environment`` hack. Ideally, this should be diff --git a/readthedocs/projects/tasks/search.py b/readthedocs/projects/tasks/search.py index 2365629a102..4ca068dd65d 100644 --- a/readthedocs/projects/tasks/search.py +++ b/readthedocs/projects/tasks/search.py @@ -159,7 +159,7 @@ def _get_indexers(*, version: Version, build: Build, search_index_name=None): indexers = [] # NOTE: The search indexer must be before the index file indexer. # This is because saving the objects in the DB will give them an id, - # and we neeed this id to be `None` when indexing the objects in ES. + # and we need this id to be `None` when indexing the objects in ES. # ES will generate a unique id for each document. # NOTE: If the version is external, we don't create a search index for it. if not version.is_external: diff --git a/readthedocs/projects/tests/test_build_tasks.py b/readthedocs/projects/tests/test_build_tasks.py index 4d3f48bfc84..678545470f6 100644 --- a/readthedocs/projects/tests/test_build_tasks.py +++ b/readthedocs/projects/tests/test_build_tasks.py @@ -1401,7 +1401,7 @@ def test_build_commands_executed_with_clone_token( os.makedirs(self.project.artifact_path(version=self.version.slug, type_="epub")) os.makedirs(self.project.artifact_path(version=self.version.slug, type_="pdf")) - get_clone_token.return_value = "toke:1234" + get_clone_token.return_value = "token:1234" github_app_installation = get( GitHubAppInstallation, installation_id=1234, diff --git a/readthedocs/projects/version_handling.py b/readthedocs/projects/version_handling.py index 75f2c33a8f1..8a72b65485c 100644 --- a/readthedocs/projects/version_handling.py +++ b/readthedocs/projects/version_handling.py @@ -106,7 +106,7 @@ def sort_versions(version_list): :returns: sorted list in descending order (latest version first) of versions - :rtype: list(tupe(readthedocs.builds.models.Version, + :rtype: list(tuple(readthedocs.builds.models.Version, packaging.version.Version)) """ versions = [] diff --git a/readthedocs/redirects/querysets.py b/readthedocs/redirects/querysets.py index a134d27a45e..5a115d1ac47 100644 --- a/readthedocs/redirects/querysets.py +++ b/readthedocs/redirects/querysets.py @@ -66,7 +66,7 @@ def get_matching_redirect_with_path( normalized_filename = self._normalize_path(filename) normalized_path = self._normalize_path(path) - # Useful to allow redirects to match paths with or without trailling slash. + # Useful to allow redirects to match paths with or without trailing slash. # For example, ``/docs`` will match ``/docs/`` and ``/docs``. filename_without_trailling_slash = self._strip_trailling_slash(normalized_filename) path_without_trailling_slash = self._strip_trailling_slash(normalized_path) @@ -164,7 +164,7 @@ def _normalize_path(self, path): return normalized_path def _strip_trailling_slash(self, path): - """Stripe the trailling slash from the path, making sure the root path is always ``/``.""" + """Stripe the trailing slash from the path, making sure the root path is always ``/``.""" path = path.rstrip("/") if path == "": return "/" diff --git a/readthedocs/rtd_tests/tests/test_oauth.py b/readthedocs/rtd_tests/tests/test_oauth.py index d9e519ba6aa..73cd710c90b 100644 --- a/readthedocs/rtd_tests/tests/test_oauth.py +++ b/readthedocs/rtd_tests/tests/test_oauth.py @@ -1020,7 +1020,7 @@ def test_get_clone_token(self, request): token = "ghs_16C7e42F292c6912E7710c838347Ae178B4a" request.post( f"{self.api_url}/app/installations/1111/access_tokens", - json=self._get_access_token_json(toke=token), + json=self._get_access_token_json(token=token), ) service = self.installation.service clone_token = service.get_clone_token(self.project) diff --git a/readthedocs/settings/base.py b/readthedocs/settings/base.py index 3891e8eea57..7ed429e8499 100644 --- a/readthedocs/settings/base.py +++ b/readthedocs/settings/base.py @@ -67,7 +67,7 @@ def _show_debug_toolbar(request): # Default ones "debug_toolbar.panels.profiling.ProfilingPanel", "debug_toolbar.panels.redirects.RedirectsPanel", - # Custome ones + # Custom ones # We are disabling these because they take a lot of time to execute in the new dashboard. # We make an intensive usage of the ``include`` template tag there. # It's a "known issue/bug" and there is no solution as far as we can tell. diff --git a/readthedocs/storage/rclone.py b/readthedocs/storage/rclone.py index ae3139892f4..44896bd4537 100644 --- a/readthedocs/storage/rclone.py +++ b/readthedocs/storage/rclone.py @@ -31,7 +31,7 @@ class BaseRClone: :param rclone_bin: Binary name or path to the rclone binary. Defaults to ``rclone``. :param default_options: Options passed to the rclone command. - :parm env_vars: Environment variables used when executing the rclone command. + :param env_vars: Environment variables used when executing the rclone command. Useful to pass secrets to the ``rclone` command, since all arguments and options will be logged. """ diff --git a/readthedocs/vcs_support/backends/git.py b/readthedocs/vcs_support/backends/git.py index f5f30c1935b..cd0fc78cfea 100644 --- a/readthedocs/vcs_support/backends/git.py +++ b/readthedocs/vcs_support/backends/git.py @@ -57,7 +57,7 @@ def get_remote_fetch_refspec(self): This method sits on top of a lot of legacy design. It decides how to treat the incoming ``Version.identifier`` from knowledge of how the caller (the build process) uses build data. - Thi is: + This is: For branches: @@ -485,7 +485,7 @@ def submodules(self) -> Iterable[str]: yield value else: # This should never happen, but we log a warning just in case the regex is wrong. - log.warning("Unexpected key extracted fom .gitmodules.", key=key) + log.warning("Unexpected key extracted from .gitmodules.", key=key) def checkout(self, identifier=None): """Checkout to identifier or latest.""" From 28527bf95958985f676425f916d08b166ca3cd34 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 24 Jul 2025 11:55:58 -0400 Subject: [PATCH 09/10] Replace 'indx' in search query within test to explicitly non-matching 'abracadabra' --- readthedocs/search/tests/test_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readthedocs/search/tests/test_api.py b/readthedocs/search/tests/test_api.py index 454f56a2dea..4fcda2c9b47 100644 --- a/readthedocs/search/tests/test_api.py +++ b/readthedocs/search/tests/test_api.py @@ -526,7 +526,7 @@ def test_search_advanced_query_detection(self, api_client): search_params = { "project": project.slug, "version": version.slug, - "q": "indx", + "q": "abracadabra", } resp = self.get_search(api_client, search_params) assert resp.status_code == 200 @@ -539,7 +539,7 @@ def test_search_advanced_query_detection(self, api_client): search_params = { "project": project.slug, "version": version.slug, - "q": '"indx"', + "q": '"abracadabra"', } resp = self.get_search(api_client, search_params) assert resp.status_code == 200 From c5202bd8174e07124b92fdb8973de918979a1939 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 24 Jul 2025 11:56:08 -0400 Subject: [PATCH 10/10] [DATALAD RUNCMD] chore: run codespell throughout fixing a few new typos automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- .github/ISSUE_TEMPLATE/feature.md | 2 +- docs/dev/aws-temporary-credentials.rst | 2 +- docs/dev/design/build-images.rst | 2 +- docs/dev/design/future-builder.rst | 2 +- docs/dev/design/new-search-api.rst | 2 +- docs/dev/github-app.rst | 4 ++-- docs/user/guides/creating-project-private-repository.rst | 2 +- docs/user/img/screenshots/business.yml | 2 +- readthedocs/api/v2/views/integrations.py | 2 +- readthedocs/api/v2/views/model_views.py | 6 +++--- readthedocs/api/v3/serializers.py | 2 +- readthedocs/builds/models.py | 8 ++++---- readthedocs/builds/version_slug.py | 2 +- readthedocs/config/config.py | 2 +- readthedocs/config/notifications.py | 2 +- readthedocs/conftest.py | 2 +- readthedocs/core/filters.py | 2 +- readthedocs/core/management/commands/contact_owners.py | 2 +- readthedocs/core/unresolver.py | 2 +- readthedocs/core/utils/filesystem.py | 2 +- readthedocs/doc_builder/director.py | 8 ++++---- readthedocs/doc_builder/environments.py | 4 ++-- readthedocs/filetreediff/dataclasses.py | 2 +- readthedocs/integrations/models.py | 2 +- readthedocs/notifications/messages.py | 2 +- readthedocs/notifications/models.py | 4 ++-- readthedocs/oauth/tasks.py | 2 +- readthedocs/organizations/tests/test_filters.py | 2 +- readthedocs/organizations/tests/test_forms.py | 2 +- readthedocs/projects/forms.py | 2 +- readthedocs/projects/models.py | 2 +- readthedocs/projects/notifications.py | 2 +- readthedocs/projects/tasks/builds.py | 6 +++--- readthedocs/projects/views/base.py | 2 +- readthedocs/proxito/middleware.py | 2 +- readthedocs/proxito/tests/test_full.py | 2 +- readthedocs/proxito/views/hosting.py | 6 +++--- readthedocs/rtd_tests/tests/test_api.py | 2 +- readthedocs/rtd_tests/tests/test_automation_rules.py | 2 +- readthedocs/rtd_tests/tests/test_doc_building.py | 2 +- readthedocs/rtd_tests/utils.py | 2 +- readthedocs/search/tests/data/sphinx/in/page.html | 2 +- readthedocs/search/utils.py | 2 +- readthedocs/settings/docker_compose.py | 4 ++-- readthedocs/subscriptions/tests/test_views.py | 4 ++-- readthedocs/telemetry/collectors.py | 4 ++-- .../notifications/deprecated_github_webhook_email.html | 2 +- .../notifications/deprecated_github_webhook_email.txt | 2 +- .../templates/projects/project_dashboard_base.html | 2 +- readthedocs/vcs_support/backends/git.py | 2 +- requirements/pip.in | 2 +- scripts/compile_version_upload_s3.sh | 2 +- 52 files changed, 70 insertions(+), 70 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md index eba72fc685d..9a12e8d1afc 100644 --- a/.github/ISSUE_TEMPLATE/feature.md +++ b/.github/ISSUE_TEMPLATE/feature.md @@ -1,6 +1,6 @@ --- name: Feature/improvement proposal -about: Propose a new feauture or improvement for Read the Docs +about: Propose a new feature or improvement for Read the Docs --- ## What's the problem this feature will solve? diff --git a/docs/dev/aws-temporary-credentials.rst b/docs/dev/aws-temporary-credentials.rst index 23497783c80..8c0d8fc6185 100644 --- a/docs/dev/aws-temporary-credentials.rst +++ b/docs/dev/aws-temporary-credentials.rst @@ -2,7 +2,7 @@ AWS temporary credentials ========================= Builders run arbitrary commands provided by the user, while we run the commands in a sandboxed environment (docker), -that shouln't be the only line of defense, as we still interact with the files generated by the user outside docker for some operations. +that shouldn't be the only line of defense, as we still interact with the files generated by the user outside docker for some operations. This is why instead of using credentials that have access to all the resources in AWS, we are using credentials that are generated by the `AWS STS service `__, diff --git a/docs/dev/design/build-images.rst b/docs/dev/design/build-images.rst index a26cb7dcf20..80162206154 100644 --- a/docs/dev/design/build-images.rst +++ b/docs/dev/design/build-images.rst @@ -39,7 +39,7 @@ on each image without asking the users to change the image selected in their con Then, when a completely different image appeared and after testing ``testing`` image enough, we discarded ``stable``, old ``latest`` became the new ``stable`` and old ``testing`` became the new ``latest``. This produced issues to people pinning their images to any of these names because after this change, -*we changed all the images for all the users* and many build issues arrised! +*we changed all the images for all the users* and many build issues arose! Goals diff --git a/docs/dev/design/future-builder.rst b/docs/dev/design/future-builder.rst index ca3055a77b9..f28b6a4dd92 100644 --- a/docs/dev/design/future-builder.rst +++ b/docs/dev/design/future-builder.rst @@ -256,6 +256,6 @@ Final notes - the project/build/user to expose a ``metadata.yaml`` with the contract that Read the Docs expects. - none, some or all the integrations will be added to the HTML output (these have to be implemented at Read the Docs core) - We are not responsible for extra formats (e.g. PDF, ePub, etc) on other tools. -- Focus on support Sphinx with nice integrations made in a tool-agnostic way that can be re-used. +- Focus on support Sphinx with nice integrations made in a tool-agnostic way that can be reused. - Removing the manipulation of ``conf.py.tmpl`` does not require us to implement the same manipulation for projects using the new potential feature ``sphinx.yaml`` file. diff --git a/docs/dev/design/new-search-api.rst b/docs/dev/design/new-search-api.rst index 036f42dfca4..d5b364daabe 100644 --- a/docs/dev/design/new-search-api.rst +++ b/docs/dev/design/new-search-api.rst @@ -142,7 +142,7 @@ now be objects. We could just reuse the old response too, since the only breaking changes would be the attributes now being objects, and we aren't adding any new information to those objects (yet). -But also, re-using the current serializers shouldn't be a problem either. +But also, reusing the current serializers shouldn't be a problem either. .. code-block:: json diff --git a/docs/dev/github-app.rst b/docs/dev/github-app.rst index 62c133bfdb5..6dabb9ece93 100644 --- a/docs/dev/github-app.rst +++ b/docs/dev/github-app.rst @@ -4,7 +4,7 @@ GitHub App Our GitHub App integration consists of a GitHub App (one for each platform, readthedocs.org and readthedocs.com), which can be installed on a user's account or organization. -After installing the GitHub App, users can grant acccess to all repositories or select specific repositories, +After installing the GitHub App, users can grant access to all repositories or select specific repositories, this allows Read the Docs to access the repositories and perform actions on them, such as reporting build statuses, and subscribe to events like push and pull request events. @@ -42,5 +42,5 @@ Security - Since we make use of the installation to perform actions on the repositories instead of the user's OAuth2 token, we make sure that only users with admin permissions on the repository can link the repository to a Read the Docs project. - Once we lose access to a repository (e.g. the installation is uninstalled or revoked, or the project was deselected from the installation), - we remove the remote repository from the database, as we don't want to keep the relation bettween the project and the repository. + we remove the remote repository from the database, as we don't want to keep the relation between the project and the repository. This is to prevent connecting the repository to the project again without the user's consent if they grant access to the repository again. diff --git a/docs/user/guides/creating-project-private-repository.rst b/docs/user/guides/creating-project-private-repository.rst index 57eb8a1c9e4..7df24a66862 100644 --- a/docs/user/guides/creating-project-private-repository.rst +++ b/docs/user/guides/creating-project-private-repository.rst @@ -147,7 +147,7 @@ Configuring repository webhooks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your repository will also need to be configured to push updates via webhooks to Read the Docs on repository events. -Webhook updates are used to automatically trigger new builds for your project and syncronize your repository's branches and tags. +Webhook updates are used to automatically trigger new builds for your project and synchronize your repository's branches and tags. This step is the same for public repositories, follow the directions for :doc:`manually configuring a Git repository integration `. diff --git a/docs/user/img/screenshots/business.yml b/docs/user/img/screenshots/business.yml index 18f4c0c7edc..01cd5d3155b 100644 --- a/docs/user/img/screenshots/business.yml +++ b/docs/user/img/screenshots/business.yml @@ -12,7 +12,7 @@ output: business-project-manual-team-select.png # Project manual creation form, have to submit with a team first. The JS looks -# funny becuase Playwright needs to wait for the page to load before submitting. +# funny because Playwright needs to wait for the page to load before submitting. - url: https://app.readthedocs.com/dashboard/import/manual/ javascript: |- const _submit = () => { diff --git a/readthedocs/api/v2/views/integrations.py b/readthedocs/api/v2/views/integrations.py index 7717ab8a17a..683c6668cfa 100644 --- a/readthedocs/api/v2/views/integrations.py +++ b/readthedocs/api/v2/views/integrations.py @@ -313,7 +313,7 @@ def get_closed_external_version_response(self, project): def update_default_branch(self, default_branch): """ - Update the `Version.identifer` for `latest` with the VCS's `default_branch`. + Update the `Version.identifier` for `latest` with the VCS's `default_branch`. The VCS's `default_branch` is the branch cloned when there is no specific branch specified (e.g. `git clone `). diff --git a/readthedocs/api/v2/views/model_views.py b/readthedocs/api/v2/views/model_views.py index 391c25a472a..77829b4635d 100644 --- a/readthedocs/api/v2/views/model_views.py +++ b/readthedocs/api/v2/views/model_views.py @@ -173,7 +173,7 @@ def get_queryset(self): If an API key is present, we filter by the project associated with the key. Otherwise, we filter using our API manager method. - With this we check if the user/api key is authorized to acccess the object. + With this we check if the user/api key is authorized to access the object. """ api_key = getattr(self.request, "build_api_key", None) if api_key: @@ -263,7 +263,7 @@ def get_serializer_class(self): """ Return the proper serializer for UI and Admin. - This ViewSet has a sligtly different pattern since we want to + This ViewSet has a slightly different pattern since we want to pre-process the `command` field before returning it to the user, and we also want to have a specific serializer for admins. """ @@ -370,7 +370,7 @@ def retrieve(self, *args, **kwargs): methods=["post"], ) def reset(self, request, **kwargs): - """Reset the build so it can be re-used when re-trying.""" + """Reset the build so it can be reused when re-trying.""" instance = self.get_object() instance.reset() return Response(status=status.HTTP_204_NO_CONTENT) diff --git a/readthedocs/api/v3/serializers.py b/readthedocs/api/v3/serializers.py index 14c1729c8ef..7a1f0da809e 100644 --- a/readthedocs/api/v3/serializers.py +++ b/readthedocs/api/v3/serializers.py @@ -613,7 +613,7 @@ def _validate_remote_repository(self, data): Validate connection between `Project` and `RemoteRepository`. We don't do anything in community, but we do ensure this relationship - is posible before creating the `Project` on commercial when the + is possible before creating the `Project` on commercial when the organization has VCS SSO enabled. If we cannot ensure the relationship here, this method should raise a diff --git a/readthedocs/builds/models.py b/readthedocs/builds/models.py index 917a0917fc4..874ea428eba 100644 --- a/readthedocs/builds/models.py +++ b/readthedocs/builds/models.py @@ -563,7 +563,7 @@ class APIVersion(Version): project = None # This is a property in the original model, in order to - # be able to assign it a value in the constructor, we need to re-declare it + # be able to assign it a value in the constructor, we need to redeclare it # as an attribute here. git_identifier = None @@ -783,7 +783,7 @@ def config(self): """ # TODO: now that we are using a proper JSONField here, we could # probably change this field to be a ForeignKey to avoid repeating the - # config file over and over again and re-use them to save db data as + # config file over and over again and reuse them to save db data as # well if self._config and self.CONFIG_KEY in self._config: return Build.objects.only("_config").get(pk=self._config[self.CONFIG_KEY])._config @@ -958,7 +958,7 @@ def external_version_name(self): def reset(self): """ - Reset the build so it can be re-used when re-trying. + Reset the build so it can be reused when re-trying. Dates and states are usually overridden by the build, we care more about deleting the commands. @@ -981,7 +981,7 @@ class BuildCommandResultMixin: Mixin for common command result methods/properties. Shared methods between the database model :py:class:`BuildCommandResult` and - non-model respresentations of build command results from the API + non-model representations of build command results from the API """ @property diff --git a/readthedocs/builds/version_slug.py b/readthedocs/builds/version_slug.py index 951deeea6ce..2251e88eb90 100644 --- a/readthedocs/builds/version_slug.py +++ b/readthedocs/builds/version_slug.py @@ -77,7 +77,7 @@ def generate_version_slug(source): ok=ok_chars, space_replacement="-", ) - # Remove first character wile it's an invalid character for the beginning of the slug. + # Remove first character while it's an invalid character for the beginning of the slug. slugified = slugified.lstrip(ok_chars) return slugified diff --git a/readthedocs/config/config.py b/readthedocs/config/config.py index e1df084e2de..2c28a806d20 100644 --- a/readthedocs/config/config.py +++ b/readthedocs/config/config.py @@ -579,7 +579,7 @@ def validate_doc_types(self): Validates that the user only have one type of documentation. This should be called before validating ``sphinx`` or ``mkdocs`` to - avoid innecessary validations. + avoid unnecessary validations. """ with self.catch_validation_error("."): if "sphinx" in self._raw_config and "mkdocs" in self._raw_config: diff --git a/readthedocs/config/notifications.py b/readthedocs/config/notifications.py index 3bca8d5d24a..dcb63713756 100644 --- a/readthedocs/config/notifications.py +++ b/readthedocs/config/notifications.py @@ -158,7 +158,7 @@ body=_( textwrap.dedent( """ - The name of the package {{pacakge}} is invalid. + The name of the package {{package}} is invalid. """ ).strip(), ), diff --git a/readthedocs/conftest.py b/readthedocs/conftest.py index 8a23a39bcd3..0a334657952 100644 --- a/readthedocs/conftest.py +++ b/readthedocs/conftest.py @@ -21,5 +21,5 @@ def clear_cache(): """ # Code run before each test yield - # Code run afer each test + # Code run after each test cache.clear() diff --git a/readthedocs/core/filters.py b/readthedocs/core/filters.py index 218db1344f4..e5b1ce10072 100644 --- a/readthedocs/core/filters.py +++ b/readthedocs/core/filters.py @@ -116,7 +116,7 @@ def get_filterset(self, **kwargs): :param kwargs: Arguments to pass to ``FilterSet.__init__`` """ # This method overrides the method from FilterMixin with differing - # arguments. We can switch this later if we ever resturcture the view + # arguments. We can switch this later if we ever restructure the view # pylint: disable=arguments-differ if not getattr(self, "filterset", None): filterset_class = self.get_filterset_class() diff --git a/readthedocs/core/management/commands/contact_owners.py b/readthedocs/core/management/commands/contact_owners.py index 2cb6c07e017..335f70c944c 100644 --- a/readthedocs/core/management/commands/contact_owners.py +++ b/readthedocs/core/management/commands/contact_owners.py @@ -69,7 +69,7 @@ class Command(BaseCommand): .. note:: If you need to extend the behavior or add a new use case, - we recommend creating a simple script file that re-use the methods + we recommend creating a simple script file that reuse the methods and functions from this command. This is an example to contact Domain owners: https://gist.github.com/humitos/3e08ed4763a9312f5c0a9a997ea95a42 diff --git a/readthedocs/core/unresolver.py b/readthedocs/core/unresolver.py index bcd15099d1b..f7469af769e 100644 --- a/readthedocs/core/unresolver.py +++ b/readthedocs/core/unresolver.py @@ -246,7 +246,7 @@ def _unresolve(self, unresolved_domain, parsed_url, append_indexhtml): """ The actual unresolver. - Extracted into a separate method so it can be re-used by + Extracted into a separate method so it can be reused by the unresolve and unresolve_path methods. """ current_project, version, filename = self._unresolve_path_with_parent_project( diff --git a/readthedocs/core/utils/filesystem.py b/readthedocs/core/utils/filesystem.py index a275ae6fe31..580089385ba 100644 --- a/readthedocs/core/utils/filesystem.py +++ b/readthedocs/core/utils/filesystem.py @@ -157,7 +157,7 @@ def safe_rmtree(path, *args, **kwargs): """ Wrapper around shutil.rmtree to check for symlinks. - shutil.rmtree doens't follow symlinks by default, + shutil.rmtree doesn't follow symlinks by default, this function just logs in case users are trying to use symlinks. https://docs.python.org/3/library/shutil.html#shutil.rmtree diff --git a/readthedocs/doc_builder/director.py b/readthedocs/doc_builder/director.py index ada7d680b13..e0ed0c7d153 100644 --- a/readthedocs/doc_builder/director.py +++ b/readthedocs/doc_builder/director.py @@ -330,7 +330,7 @@ def create_environment(self): return # If the builder is generic, we have nothing to do here, - # as the commnads are provided by the user. + # as the commands are provided by the user. if self.data.config.doctype == GENERIC: return @@ -343,7 +343,7 @@ def install(self): return # If the builder is generic, we have nothing to do here, - # as the commnads are provided by the user. + # as the commands are provided by the user. if self.data.config.doctype == GENERIC: return @@ -650,7 +650,7 @@ def install_build_tools(self): ] ): # We cap setuptools to avoid breakage of projects - # relying on setup.py invokations, + # relying on setup.py invocations, # see https://github.com/readthedocs/readthedocs.org/issues/8659 setuptools_version = ( "setuptools<58.3.0" @@ -683,7 +683,7 @@ def build_docs_class(self, builder_class): process. """ # If the builder is generic, we have nothing to do here, - # as the commnads are provided by the user. + # as the commands are provided by the user. if builder_class == GENERIC: return diff --git a/readthedocs/doc_builder/environments.py b/readthedocs/doc_builder/environments.py index 3a3253e3e68..71c99a9edcd 100644 --- a/readthedocs/doc_builder/environments.py +++ b/readthedocs/doc_builder/environments.py @@ -278,7 +278,7 @@ def save(self, api_client): # TODO don't do this, address builds restarting instead. # We try to post the buildcommand again as a temporary fix # for projects that restart the build process. There seems to be - # something that causes a 404 during `patch()` in some biulds, + # something that causes a 404 during `patch()` in some builds, # so we assume retrying `post()` for the build command is okay. log.exception("Build command has an id but doesn't exist in the database.") resp = api_client.command.post(data) @@ -430,7 +430,7 @@ class BaseBuildEnvironment: :param version: Project version that is being built :param build: Build instance :param environment: shell environment variables - :param record: whether or not record a build commands in the databse via + :param record: whether or not record a build commands in the database via the API. The only case where we want this to be `False` is when instantiating this class from `sync_repository_task` because it's a background task that does not expose commands to the user. diff --git a/readthedocs/filetreediff/dataclasses.py b/readthedocs/filetreediff/dataclasses.py index 58846184f09..f7edac891c9 100644 --- a/readthedocs/filetreediff/dataclasses.py +++ b/readthedocs/filetreediff/dataclasses.py @@ -155,7 +155,7 @@ def _sortpath(self, file: FileTreeDiffFile): However, it doesn't group the results by directory. Ideally, this should sort file names by hierarchy (less deep directory - first), groupping them by directory and alphabetically. We should update + first), grouping them by directory and alphabetically. We should update this function to achieve that goal if we find a simple way to do it. """ parts = file.path.split("/") diff --git a/readthedocs/integrations/models.py b/readthedocs/integrations/models.py index 2f0d71dc666..abd313413f0 100644 --- a/readthedocs/integrations/models.py +++ b/readthedocs/integrations/models.py @@ -387,7 +387,7 @@ def get_absolute_url(self) -> str | None: projects we show a link in the UI to the GHA installation page for the installation used by the project. """ - # If the GHA is disconnected we'll disonnect the remote repository and + # If the GHA is disconnected we'll disconnect the remote repository and # so we won't have a URL to the installation page the project should be # using. We might want to store this on the model later so a repository # that is removed from the installation can still link to the diff --git a/readthedocs/notifications/messages.py b/readthedocs/notifications/messages.py index a2018b91983..0c80aeecffe 100644 --- a/readthedocs/notifications/messages.py +++ b/readthedocs/notifications/messages.py @@ -327,7 +327,7 @@ def get_rendered_body(self): ), Message( id=BuildUserError.BUILD_OUTPUT_OLD_DIRECTORY_USED, - header=_("Your project is outputing files in an old directory"), + header=_("Your project is outputting files in an old directory"), body=_( textwrap.dedent( """ diff --git a/readthedocs/notifications/models.py b/readthedocs/notifications/models.py index 92ff0d980a4..df674162401 100644 --- a/readthedocs/notifications/models.py +++ b/readthedocs/notifications/models.py @@ -22,7 +22,7 @@ class Notification(TimeStampedModel): message_id = models.CharField(max_length=128) # UNREAD: the notification was not shown to the user - # READ: the notifiation was shown + # READ: the notification was shown # DISMISSED: the notification was shown and the user dismissed it # CANCELLED: removed automatically because the user has done the action required (e.g. paid the subscription) state = models.CharField( @@ -37,7 +37,7 @@ class Notification(TimeStampedModel): db_index=True, ) - # Makes the notification imposible to dismiss (useful for Build notifications) + # Makes the notification impossible to dismiss (useful for Build notifications) dismissable = models.BooleanField(default=False) # Show the notification under the bell icon for the user diff --git a/readthedocs/oauth/tasks.py b/readthedocs/oauth/tasks.py index cc63a9aba9d..15d716fb507 100644 --- a/readthedocs/oauth/tasks.py +++ b/readthedocs/oauth/tasks.py @@ -76,7 +76,7 @@ def sync_remote_repositories_organizations(organization_slugs=None): It will trigger one `sync_remote_repositories` task per user. - :param organization_slugs: list containg organization's slugs to sync. If + :param organization_slugs: list containing organization's slugs to sync. If not passed, all organizations with ALLAUTH SSO enabled will be synced :type organization_slugs: list diff --git a/readthedocs/organizations/tests/test_filters.py b/readthedocs/organizations/tests/test_filters.py index 369cfeeb1ca..b536d1ba27a 100644 --- a/readthedocs/organizations/tests/test_filters.py +++ b/readthedocs/organizations/tests/test_filters.py @@ -566,7 +566,7 @@ def test_filtered_queryset_team_invalid_choice(self, user, organization): indirect=True, ) def test_team_filter_choices(self, user, organization, teams): - """Team filter choices limited to organization teams with permisisons.""" + """Team filter choices limited to organization teams with permissions.""" filter = self.get_filterset_for_user( user, organization=organization, diff --git a/readthedocs/organizations/tests/test_forms.py b/readthedocs/organizations/tests/test_forms.py index 919f2aeb923..db78f84b0b9 100644 --- a/readthedocs/organizations/tests/test_forms.py +++ b/readthedocs/organizations/tests/test_forms.py @@ -122,7 +122,7 @@ def test_add_fresh_member_by_email(self): def test_add_duplicate_invite_by_email(self): """Add duplicate invite by email.""" self.assertEqual(self.organization.teams.count(), 1) - email = "non-existant@example.com" + email = "non-existent@example.com" self.assertEqual(Invitation.objects.all().count(), 0) diff --git a/readthedocs/projects/forms.py b/readthedocs/projects/forms.py index 40311c796fa..8ca72c92684 100644 --- a/readthedocs/projects/forms.py +++ b/readthedocs/projects/forms.py @@ -1058,7 +1058,7 @@ def _check_for_suspicious_cname(self, domain): # If the domain has a CNAME pointing to the APEX domain, that's not good. # This check isn't perfect, but it's a good enoug heuristic - # to dectect CNAMES like www.example.com -> example.com. + # to detect CNAMES like www.example.com -> example.com. if f"{domain}.".endswith(f".{cname}"): raise forms.ValidationError( _( diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py index cb75b094e05..0623693ce3e 100644 --- a/readthedocs/projects/models.py +++ b/readthedocs/projects/models.py @@ -1477,7 +1477,7 @@ class APIProject(Project): features = [] # This is a property in the original model, in order to - # be able to assign it a value in the constructor, we need to re-declare it + # be able to assign it a value in the constructor, we need to redeclare it # as an attribute here. clone_token = None diff --git a/readthedocs/projects/notifications.py b/readthedocs/projects/notifications.py index 9b9e5d43e7a..2e4fc616ac8 100644 --- a/readthedocs/projects/notifications.py +++ b/readthedocs/projects/notifications.py @@ -101,7 +101,7 @@ ), Message( id=RepositoryError.UNSUPPORTED_VCS, - header=_("Repository type not suported"), + header=_("Repository type not supported"), body=_( textwrap.dedent( """ diff --git a/readthedocs/projects/tasks/builds.py b/readthedocs/projects/tasks/builds.py index 7034cea4190..4e8cbc663d0 100644 --- a/readthedocs/projects/tasks/builds.py +++ b/readthedocs/projects/tasks/builds.py @@ -81,11 +81,11 @@ @dataclass(slots=True) class TaskData: """ - Object to store all data related to a Celery task excecution. + Object to store all data related to a Celery task execution. - We use this object from inside the task to store data while we are runnig + We use this object from inside the task to store data while we are running the task. This is to avoid using `self.` inside the task due to its - limitations: it's instanciated once and that instance is re-used for all + limitations: it's instantiated once and that instance is reused for all the tasks ran. This could produce sharing instance state between two different and unrelated tasks. diff --git a/readthedocs/projects/views/base.py b/readthedocs/projects/views/base.py index d7c14f21bd6..0b0a6e20ba1 100644 --- a/readthedocs/projects/views/base.py +++ b/readthedocs/projects/views/base.py @@ -102,7 +102,7 @@ class ProjectSpamMixin: def is_show_dashboard_denied_wrapper(self): """ - Determine if the project has reached dashboard denied treshold. + Determine if the project has reached dashboard denied threshold. This function is wrapped just for testing purposes, so we are able to mock it from outside. diff --git a/readthedocs/proxito/middleware.py b/readthedocs/proxito/middleware.py index 04f0b82c925..5eac0b7a233 100644 --- a/readthedocs/proxito/middleware.py +++ b/readthedocs/proxito/middleware.py @@ -321,7 +321,7 @@ def add_cors_headers(self, request, response): """ # TODO: se should add these headers to files from docs only, # proxied APIs and other endpoints should not have CORS headers. - # These attributes aren't currently set for proxied APIs, but we shuold + # These attributes aren't currently set for proxied APIs, but we should # find a better way to do this. project_slug = getattr(request, "path_project_slug", "") version_slug = getattr(request, "path_version_slug", "") diff --git a/readthedocs/proxito/tests/test_full.py b/readthedocs/proxito/tests/test_full.py index b701be6aa83..4ecaf59ac39 100644 --- a/readthedocs/proxito/tests/test_full.py +++ b/readthedocs/proxito/tests/test_full.py @@ -201,7 +201,7 @@ def test_external_version_serving_old_slugs(self): """ Test external version serving with projects with `--` in their slug. - Some old projects may have been created with a slug containg `--`, + Some old projects may have been created with a slug containing `--`, our current code doesn't allow these type of slugs. """ fixture.get( diff --git a/readthedocs/proxito/views/hosting.py b/readthedocs/proxito/views/hosting.py index fe491df40f1..6345baa9d20 100644 --- a/readthedocs/proxito/views/hosting.py +++ b/readthedocs/proxito/views/hosting.py @@ -51,7 +51,7 @@ class ClientError(Exception): VERSION_NOT_CURRENTLY_SUPPORTED = ( "The version specified in 'api-version' is currently not supported" ) - VERSION_INVALID = "The version specifified in 'api-version' is invalid" + VERSION_INVALID = "The version specified in 'api-version' is invalid" PROJECT_NOT_FOUND = "There is no project with the 'project-slug' requested" @@ -470,7 +470,7 @@ def _v1(self, project, version, build, filename, url, request): # NOTE: this is an example of the structure of the this object. # It contains the name of the filter and the search syntax to prepend # to the user's query. - # It uses "Search query sintax": + # It uses "Search query syntax": # https://docs.readthedocs.io/en/stable/server-side-search/syntax.html # [ # "Include subprojects", @@ -575,7 +575,7 @@ def _v1(self, project, version, build, filename, url, request): { "ethicalads": { "enabled": project.addons.ethicalads_enabled, - # NOTE: this endpoint is not authenticated, the user checks are done over an annonymous user for now + # NOTE: this endpoint is not authenticated, the user checks are done over an anonymous user for now # # NOTE: it requires ``settings.USE_PROMOS=True`` to return ``ad_free=false`` here "ad_free": is_ad_free_user(AnonymousUser()) or is_ad_free_project(project), diff --git a/readthedocs/rtd_tests/tests/test_api.py b/readthedocs/rtd_tests/tests/test_api.py index 8179b2770aa..f89861d1861 100644 --- a/readthedocs/rtd_tests/tests/test_api.py +++ b/readthedocs/rtd_tests/tests/test_api.py @@ -618,7 +618,7 @@ def test_get_raw_log_building(self): self.assertIn("Commit: {}".format(build.commit), resp.content.decode()) self.assertIn("Date: ", resp.content.decode()) self.assertIn("State: building", resp.content.decode()) - self.assertIn("Success: Unknow", resp.content.decode()) + self.assertIn("Success: Unknown", resp.content.decode()) self.assertIn("[rtd-command-info]", resp.content.decode()) self.assertIn( "python setup.py install\nInstalling dependencies...", diff --git a/readthedocs/rtd_tests/tests/test_automation_rules.py b/readthedocs/rtd_tests/tests/test_automation_rules.py index a6b9df0e507..55716ec0c50 100644 --- a/readthedocs/rtd_tests/tests/test_automation_rules.py +++ b/readthedocs/rtd_tests/tests/test_automation_rules.py @@ -400,7 +400,7 @@ def test_add_rule_regex(self): assert self.project.automation_rules.count() == 2 assert rule.priority == 0 - # Adding a rule with a not secuencial priority + # Adding a rule with a not sequential priority rule = get( RegexAutomationRule, description="Third rule", diff --git a/readthedocs/rtd_tests/tests/test_doc_building.py b/readthedocs/rtd_tests/tests/test_doc_building.py index f7c74e8e024..dd86a5da170 100644 --- a/readthedocs/rtd_tests/tests/test_doc_building.py +++ b/readthedocs/rtd_tests/tests/test_doc_building.py @@ -247,7 +247,7 @@ def test_result(self): def test_missing_command(self): """Test missing command.""" - path = os.path.join("non-existant", str(uuid.uuid4())) + path = os.path.join("non-existent", str(uuid.uuid4())) self.assertFalse(os.path.exists(path)) cmd = BuildCommand(path) cmd.run() diff --git a/readthedocs/rtd_tests/utils.py b/readthedocs/rtd_tests/utils.py index c258a41ab25..58eaf54396a 100644 --- a/readthedocs/rtd_tests/utils.py +++ b/readthedocs/rtd_tests/utils.py @@ -215,7 +215,7 @@ def delete_git_branch(directory, branch): def create_git_submodule( directory, submodule, - msg="Add realative submodule", + msg="Add relative submodule", branch="master", ): env = environ.copy() diff --git a/readthedocs/search/tests/data/sphinx/in/page.html b/readthedocs/search/tests/data/sphinx/in/page.html index d9caaee9153..975a07e54a4 100644 --- a/readthedocs/search/tests/data/sphinx/in/page.html +++ b/readthedocs/search/tests/data/sphinx/in/page.html @@ -151,7 +151,7 @@

Footnotes and domains - +
1(1,2)
diff --git a/readthedocs/search/utils.py b/readthedocs/search/utils.py index bb1e613aac1..03a5c795d82 100644 --- a/readthedocs/search/utils.py +++ b/readthedocs/search/utils.py @@ -13,7 +13,7 @@ def index_objects(document, objects, index_name=None, chunk_size=500): if not DEDConfig.autosync_enabled(): - log.info("Autosync disabled, skipping searh indexing.") + log.info("Autosync disabled, skipping search indexing.") return # If a search index name is provided, we need to temporarily change diff --git a/readthedocs/settings/docker_compose.py b/readthedocs/settings/docker_compose.py index ec5a0d909db..9d9ed13d46a 100644 --- a/readthedocs/settings/docker_compose.py +++ b/readthedocs/settings/docker_compose.py @@ -58,7 +58,7 @@ class DockerBaseSettings(CommunityBaseSettings): def DOCROOT(self): # Add an extra directory level using the container's hostname. # This allows us to run development environment with multiple builders (`--scale-build=2` or more), - # and avoid the builders overwritting each others when building the same project/version + # and avoid the builders overwriting each others when building the same project/version return os.path.join(super().DOCROOT, socket.gethostname()) # New templates @@ -206,7 +206,7 @@ def AWS_S3_ENDPOINT_URL(self): @property def SOCIALACCOUNT_PROVIDERS(self): - """Allow settings social account settigs from the host system.""" + """Allow settings social account settings from the host system.""" providers = self._SOCIALACCOUNT_PROVIDERS for provider in providers.keys(): try: diff --git a/readthedocs/subscriptions/tests/test_views.py b/readthedocs/subscriptions/tests/test_views.py index e618e2b51e0..afefa3d081c 100644 --- a/readthedocs/subscriptions/tests/test_views.py +++ b/readthedocs/subscriptions/tests/test_views.py @@ -115,7 +115,7 @@ def test_active_subscription(self): self.assertEqual(resp.context["stripe_subscription"], self.stripe_subscription) self.assertContains(resp, "active") self.assertNotContains(resp, "Extra products:") - # The subscribe form isn't shown, but the manage susbcription button is. + # The subscribe form isn't shown, but the manage subscription button is. self.assertContains(resp, "Manage subscription") self.assertNotContains(resp, "Start subscription") @@ -133,7 +133,7 @@ def test_active_subscription_with_extra_product(self): self.assertEqual(resp.context["stripe_subscription"], self.stripe_subscription) self.assertContains(resp, "active") self.assertContains(resp, "Extra products:") - # The subscribe form isn't shown, but the manage susbcription button is. + # The subscribe form isn't shown, but the manage subscription button is. self.assertContains(resp, "Manage subscription") self.assertNotContains(resp, "Start subscription") diff --git a/readthedocs/telemetry/collectors.py b/readthedocs/telemetry/collectors.py index 8916424e0db..0447f38c833 100644 --- a/readthedocs/telemetry/collectors.py +++ b/readthedocs/telemetry/collectors.py @@ -17,7 +17,7 @@ class BuildDataCollector: """ Build data collector. - Collect data from a runnig build. + Collect data from a running build. """ def __init__(self, environment): @@ -58,7 +58,7 @@ def run(self, *args, **kwargs): def collect(self): """ - Collect all relevant data from the runnig build. + Collect all relevant data from the running build. Data that can be extracted from the database (project/organization) isn't collected here. diff --git a/readthedocs/templates/projects/notifications/deprecated_github_webhook_email.html b/readthedocs/templates/projects/notifications/deprecated_github_webhook_email.html index b55a906c932..31da9541464 100644 --- a/readthedocs/templates/projects/notifications/deprecated_github_webhook_email.html +++ b/readthedocs/templates/projects/notifications/deprecated_github_webhook_email.html @@ -4,7 +4,7 @@

To continue building your Read the Docs project on changes to your repository, you will need to add a new webhook on your GitHub repository. You can either connect your GitHub account and configure a GitHub webhook integration, or you can add a generic webhook integration.

-

You can find more information on our webhook intergrations in our documentation, at:

+

You can find more information on our webhook integrations in our documentation, at:

{% comment %}Plain text link because of text version of email{% endcomment %}

https://docs.readthedocs.io/page/webhooks.html#webhook-github-services

diff --git a/readthedocs/templates/projects/notifications/deprecated_github_webhook_email.txt b/readthedocs/templates/projects/notifications/deprecated_github_webhook_email.txt index 07eeb747b5b..3ced4a361fb 100644 --- a/readthedocs/templates/projects/notifications/deprecated_github_webhook_email.txt +++ b/readthedocs/templates/projects/notifications/deprecated_github_webhook_email.txt @@ -9,7 +9,7 @@ you will need to add a new webhook on your GitHub repository. You can either connect your GitHub account and configure a GitHub webhook integration, or you can add a generic webhook integration. -You can find more information on our webhook intergrations in our documentation, at: +You can find more information on our webhook integrations in our documentation, at: https://docs.readthedocs.io/page/webhooks.html#webhook-github-services {% endblock %} diff --git a/readthedocs/templates/projects/project_dashboard_base.html b/readthedocs/templates/projects/project_dashboard_base.html index 875c1080aed..adfde6d7717 100644 --- a/readthedocs/templates/projects/project_dashboard_base.html +++ b/readthedocs/templates/projects/project_dashboard_base.html @@ -77,7 +77,7 @@

{% trans "Projects" %}

{% trans "passing" %} {% else %} {% trans "failing" %} - {# TODO: What whould be show here when "not build.sucess and cancelled"? #} + {# TODO: What would be show here when "not build.success and cancelled"? #} {% endif %} {% else %} {% trans "No builds yet" %} diff --git a/readthedocs/vcs_support/backends/git.py b/readthedocs/vcs_support/backends/git.py index cd0fc78cfea..f37c076836a 100644 --- a/readthedocs/vcs_support/backends/git.py +++ b/readthedocs/vcs_support/backends/git.py @@ -171,7 +171,7 @@ def has_ssh_key_with_write_access(self) -> bool: .. note:: This check is better done just after the clone step, - to ensure that no commands controled by the user are run. + to ensure that no commands controlled by the user are run. """ remote_name = "rtd-test-ssh-key" ssh_url = self.project.repo diff --git a/requirements/pip.in b/requirements/pip.in index c5fcc8c6aa7..811aef1eb13 100644 --- a/requirements/pip.in +++ b/requirements/pip.in @@ -135,7 +135,7 @@ gunicorn bumpver -# xmlsec is a dependecy from python3-saml which is required by django-allauth. +# xmlsec is a dependency from python3-saml which is required by django-allauth. # We have to pin it because the underlying `libxml2-dev` package installed at # system level is incompatible with the Python version # https://github.com/xmlsec/python-xmlsec/issues/324 diff --git a/scripts/compile_version_upload_s3.sh b/scripts/compile_version_upload_s3.sh index 58ed7c52afe..48e93a30fab 100755 --- a/scripts/compile_version_upload_s3.sh +++ b/scripts/compile_version_upload_s3.sh @@ -6,7 +6,7 @@ # This script automates the process to build and upload a Python/Node/Rust/Go # version and upload it to S3 making it available for the builders. When a # pre-compiled version is available in the cache, builds are faster because they -# don't have to donwload and compile the requested version. +# don't have to download and compile the requested version. # # # LOCAL DEVELOPMENT ENVIRONMENT