diff --git a/readthedocs/api/v2/utils.py b/readthedocs/api/v2/utils.py
index 578bd8faad8..9788f4b553f 100644
--- a/readthedocs/api/v2/utils.py
+++ b/readthedocs/api/v2/utils.py
@@ -30,7 +30,7 @@ def sync_versions_to_db(project, versions, type): # pylint: disable=redefined-b
- it does not delete versions
:param project: project to update versions
- :param versions: list of VCSVersion fetched from the respository
+ :param versions: list of VCSVersion fetched from the repository
:param type: internal or external version
:returns: set of versions' slug added
"""
diff --git a/readthedocs/api/v2/views/integrations.py b/readthedocs/api/v2/views/integrations.py
index 8833fb23755..065b3edfb41 100644
--- a/readthedocs/api/v2/views/integrations.py
+++ b/readthedocs/api/v2/views/integrations.py
@@ -756,7 +756,7 @@ class WebhookView(APIView):
be.
.. warning::
- We're turning off Authenication for this view.
+ We're turning off Authentication for this view.
This fixes a bug where we were double-authenticating these views,
because of the way we're passing the request along to the subviews.
diff --git a/readthedocs/api/v3/permissions.py b/readthedocs/api/v3/permissions.py
index 4eabebcdda8..aaebfa2411a 100644
--- a/readthedocs/api/v3/permissions.py
+++ b/readthedocs/api/v3/permissions.py
@@ -79,7 +79,7 @@ class CommonPermissionsBase(BasePermission):
Common permission class used for most APIv3 endpoints.
This class should be used by ``APIv3Settings.permission_classes`` to define
- the permissions for most APIv3 endpoints. It has to be overriden from
+ the permissions for most APIv3 endpoints. It has to be overridden from
corporate to define proper permissions there.
"""
diff --git a/readthedocs/api/v3/routers.py b/readthedocs/api/v3/routers.py
index 7b768b4b2fb..eebffc3ba46 100644
--- a/readthedocs/api/v3/routers.py
+++ b/readthedocs/api/v3/routers.py
@@ -9,7 +9,7 @@ class DocsAPIRootView(APIRootView):
"""
Read the Docs APIv3 root endpoint.
- The API is browseable by sending the header ``Authorization: Token `` on each request. You can find your Token at [https://readthedocs.org/accounts/tokens/](https://readthedocs.org/accounts/tokens/).
+ The API is browsable by sending the header ``Authorization: Token `` on each request. You can find your Token at [https://readthedocs.org/accounts/tokens/](https://readthedocs.org/accounts/tokens/).
Read its full documentation at [https://docs.readthedocs.io/page/api/v3.html](https://docs.readthedocs.io/page/api/v3.html).
""" # noqa
diff --git a/readthedocs/api/v3/serializers.py b/readthedocs/api/v3/serializers.py
index 12004ef2bf4..fc3119fe898 100644
--- a/readthedocs/api/v3/serializers.py
+++ b/readthedocs/api/v3/serializers.py
@@ -184,7 +184,7 @@ def get_success(self, obj):
"""
Return ``None`` if the build is not finished.
- This is needed becase ``default=True`` in the model field.
+ This is needed because ``default=True`` in the model field.
"""
if obj.finished:
return obj.success
diff --git a/readthedocs/api/v3/views.py b/readthedocs/api/v3/views.py
index dd2ed9be6a9..958b81b2f2e 100644
--- a/readthedocs/api/v3/views.py
+++ b/readthedocs/api/v3/views.py
@@ -406,7 +406,7 @@ def get_view_name(self):
return f'Organizations {self.suffix}'
def get_queryset(self):
- # Allow hitting ``/api/v3/organizations/`` to list their own organizaions
+ # Allow hitting ``/api/v3/organizations/`` to list their own organizations
if self.basename == 'organizations' and self.action == 'list':
# We force returning ``Organization`` objects here because it's
# under the ``organizations`` view.
diff --git a/readthedocs/config/config.py b/readthedocs/config/config.py
index 0a9f37c2003..e2307b23f8f 100644
--- a/readthedocs/config/config.py
+++ b/readthedocs/config/config.py
@@ -146,7 +146,7 @@ class BuildConfigBase:
You need to call ``validate`` before the config is ready to use.
- :param env_config: A dict that cointains additional information
+ :param env_config: A dict that contains additional information
about the environment.
:param raw_config: A dict with all configuration without validation.
:param source_file: The file that contains the configuration.
@@ -1026,8 +1026,8 @@ def validate_submodules(self):
"""
Validates the submodules key.
- - We can use the ``ALL`` keyword in include or exlude.
- - We can't exlude and include submodules at the same time.
+ - We can use the ``ALL`` keyword in include or exclude.
+ - We can't exclude and include submodules at the same time.
"""
raw_submodules = self._raw_config.get('submodules', {})
with self.catch_validation_error('submodules'):
diff --git a/readthedocs/config/models.py b/readthedocs/config/models.py
index 714f9b80328..95159940f0f 100644
--- a/readthedocs/config/models.py
+++ b/readthedocs/config/models.py
@@ -9,7 +9,7 @@ class Base:
Base class for every configuration.
Each inherited class should define
- its attibutes in the `__slots__` attribute.
+ its attributes in the `__slots__` attribute.
We are using `__slots__` so we can't add more attributes by mistake,
this is similar to a namedtuple.
diff --git a/readthedocs/config/validation.py b/readthedocs/config/validation.py
index 21a10fd0bf4..065583e9c32 100644
--- a/readthedocs/config/validation.py
+++ b/readthedocs/config/validation.py
@@ -94,7 +94,7 @@ def validate_path_pattern(value):
- Checks the final path is relative to the root of the site ``/``.
"""
path = validate_string(value)
- # Start the path with ``/`` to interprete the path as absolute to ``/``.
+ # Start the path with ``/`` to interpret the path as absolute to ``/``.
path = '/' + path.lstrip('/')
path = os.path.normpath(path)
if not os.path.isabs(path):
diff --git a/readthedocs/core/utils/__init__.py b/readthedocs/core/utils/__init__.py
index 775d3c077f9..094d99a3e28 100644
--- a/readthedocs/core/utils/__init__.py
+++ b/readthedocs/core/utils/__init__.py
@@ -1,4 +1,4 @@
-"""Common utilty functions."""
+"""Common utility functions."""
import datetime
import errno
diff --git a/readthedocs/embed/views.py b/readthedocs/embed/views.py
index 7e85423adf5..c63ac207a95 100644
--- a/readthedocs/embed/views.py
+++ b/readthedocs/embed/views.py
@@ -196,7 +196,7 @@ class EmbedAPI(SettingsOverrideObject):
def do_embed(*, project, version, doc=None, path=None, section=None, url=None):
- """Get the embed reponse from a document section."""
+ """Get the embed response from a document section."""
if not url:
external = version.type == EXTERNAL
url = resolve(
diff --git a/readthedocs/organizations/forms.py b/readthedocs/organizations/forms.py
index 406a00dba61..650e4d81097 100644
--- a/readthedocs/organizations/forms.py
+++ b/readthedocs/organizations/forms.py
@@ -105,7 +105,7 @@ def _create_default_teams(organization):
def save(self, commit=True):
org = super().save(commit)
- # If not commiting, we can't save M2M fields
+ # If not committing, we can't save M2M fields
if not commit:
return org
diff --git a/readthedocs/projects/forms.py b/readthedocs/projects/forms.py
index aa4e7a7c55f..d0cbc9e5ed8 100644
--- a/readthedocs/projects/forms.py
+++ b/readthedocs/projects/forms.py
@@ -574,7 +574,7 @@ def get_translation_queryset(self):
def save(self, commit=True):
if commit:
# Don't use ``self.parent.translations.add()`` here as this
- # triggeres a problem with database routing and multiple databases.
+ # triggers a problem with database routing and multiple databases.
# Directly set the ``main_language_project`` instead of doing a
# bulk update.
self.translation.main_language_project = self.parent
diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py
index bc76d2fbd84..ba02c035551 100644
--- a/readthedocs/projects/models.py
+++ b/readthedocs/projects/models.py
@@ -1648,7 +1648,7 @@ def add_features(sender, **kwargs):
SKIP_SYNC_BRANCHES = 'skip_sync_branches'
SKIP_SYNC_VERSIONS = 'skip_sync_versions'
- # Dependecies related features
+ # Dependencies related features
PIP_ALWAYS_UPGRADE = 'pip_always_upgrade'
USE_NEW_PIP_RESOLVER = 'use_new_pip_resolver'
DONT_INSTALL_LATEST_PIP = 'dont_install_latest_pip'
@@ -1740,7 +1740,7 @@ def add_features(sender, **kwargs):
_('Skip sync versions task'),
),
- # Dependecies related features
+ # Dependencies related features
(PIP_ALWAYS_UPGRADE, _('Always run pip install --upgrade')),
(USE_NEW_PIP_RESOLVER, _('Use new pip resolver')),
(
diff --git a/readthedocs/projects/tasks.py b/readthedocs/projects/tasks.py
index 524b40e488a..e3a2c98ad25 100644
--- a/readthedocs/projects/tasks.py
+++ b/readthedocs/projects/tasks.py
@@ -450,7 +450,7 @@ def update_docs_task(self, version_pk, *args, **kwargs):
def sigterm_received(*args, **kwargs):
log.warning('SIGTERM received. Waiting for build to stop gracefully after it finishes.')
- # Do not send the SIGTERM signal to childs (pip is automatically killed when
+ # Do not send the SIGTERM signal to children (pip is automatically killed when
# receives SIGTERM and make the build to fail one command and stop build)
signal.signal(signal.SIGTERM, sigterm_received)
diff --git a/readthedocs/proxito/tests/test_old_redirects.py b/readthedocs/proxito/tests/test_old_redirects.py
index ca5b0f06132..fa5b186e6a6 100644
--- a/readthedocs/proxito/tests/test_old_redirects.py
+++ b/readthedocs/proxito/tests/test_old_redirects.py
@@ -534,7 +534,7 @@ def test_not_found_page_without_trailing_slash(self):
# FIXME: these tests are valid, but the problem I'm facing is that the request
-# is received as ``GET '//my.host/path/'`` (note that we are loosing the http:)
+# is received as ``GET '//my.host/path/'`` (note that we are losing the http:)
@pytest.mark.xfail(strict=True)
class UserRedirectCrossdomainTest(BaseDocServing):
diff --git a/readthedocs/proxito/views/mixins.py b/readthedocs/proxito/views/mixins.py
index 98498cbb0dc..369355912f0 100644
--- a/readthedocs/proxito/views/mixins.py
+++ b/readthedocs/proxito/views/mixins.py
@@ -263,7 +263,7 @@ def get_redirect_response(self, request, redirect_path, proxito_path, http_statu
"""
Build the response for the ``redirect_path``, ``proxito_path`` and its ``http_status``.
- :returns: redirect respose with the correct path
+ :returns: redirect response with the correct path
:rtype: HttpResponseRedirect or HttpResponsePermanentRedirect
"""
diff --git a/readthedocs/search/api.py b/readthedocs/search/api.py
index 96c2c3dbdec..df00f527092 100644
--- a/readthedocs/search/api.py
+++ b/readthedocs/search/api.py
@@ -267,7 +267,7 @@ def _has_permission(self, user, version):
Check if `user` is authorized to access `version`.
The queryset from `_get_subproject_version` already filters public
- projects. This is mainly to be overriden in .com to make use of
+ projects. This is mainly to be overridden in .com to make use of
the auth backends in the proxied API.
"""
return True
diff --git a/readthedocs/search/faceted_search.py b/readthedocs/search/faceted_search.py
index fa24d5abd0a..7ab7db93482 100644
--- a/readthedocs/search/faceted_search.py
+++ b/readthedocs/search/faceted_search.py
@@ -77,7 +77,7 @@ def __init__(
filters = filters or {}
- # We may recieve invalid filters
+ # We may receive invalid filters
valid_filters = {
k: v
for k, v in filters.items()
@@ -218,7 +218,7 @@ def _is_advanced_query(self, query):
return not tokens.isdisjoint(query_tokens)
def aggregate(self, search):
- """Overriden to decide if we should aggregate or not."""
+ """Overridden to decide if we should aggregate or not."""
if self.aggregate_results:
super().aggregate(search)
diff --git a/readthedocs/search/parsers.py b/readthedocs/search/parsers.py
index c31d35cbbee..7a1af27bb26 100644
--- a/readthedocs/search/parsers.py
+++ b/readthedocs/search/parsers.py
@@ -407,7 +407,7 @@ def _clean_body(self, body):
"""
Removes sphinx domain nodes.
- This method is overriden to remove contents that are likely
+ This method is overridden to remove contents that are likely
to be a sphinx domain (`dl` tags).
We already index those in another step.
"""
@@ -585,7 +585,7 @@ def _process_index_file(self, json_path, page):
path = parsed_path.path
# Some old versions of mkdocs
- # index the pages as ``/page.html`` insted of ``page.html``.
+ # index the pages as ``/page.html`` instead of ``page.html``.
path = path.lstrip('/')
if path == '' or path.endswith('/'):
diff --git a/readthedocs/search/tests/test_utils.py b/readthedocs/search/tests/test_utils.py
index 38d25330ecd..6d7dc6a13be 100644
--- a/readthedocs/search/tests/test_utils.py
+++ b/readthedocs/search/tests/test_utils.py
@@ -70,7 +70,7 @@ def test_remove_only_one_version_index(self, api_client, all_projects):
time.sleep(1)
assert self.has_results(api_client, project, LATEST) is False
- # Ony latest was deleted.
+ # Only latest was deleted.
assert self.has_results(api_client, project, STABLE) is True
for project in ['pipeline', 'docs']:
diff --git a/readthedocs/settings/base.py b/readthedocs/settings/base.py
index c07af4e1c70..f00908e0f96 100644
--- a/readthedocs/settings/base.py
+++ b/readthedocs/settings/base.py
@@ -545,7 +545,7 @@ def DOCKER_LIMITS(self):
process per server, which will be allowed to consume all available
memory.
- We substract 750MiB for overhead of processes and base system, and set
+ We subtract 750MiB for overhead of processes and base system, and set
the build time as proportional to the memory limit.
"""
# Our normal default
@@ -609,7 +609,7 @@ def DOCKER_LIMITS(self):
'authorization',
'x-csrftoken'
)
- # Additional protecion to allow only idempotent methods.
+ # Additional protection to allow only idempotent methods.
CORS_ALLOW_METHODS = [
'GET',
'OPTIONS',
diff --git a/readthedocs/templates/account/signup.html b/readthedocs/templates/account/signup.html
index d4bb80582e2..34aa2d85b6e 100644
--- a/readthedocs/templates/account/signup.html
+++ b/readthedocs/templates/account/signup.html
@@ -33,7 +33,7 @@ {% trans "Sign Up" %}
{% blocktrans trimmed %}
Sign up using the following provider.
If you don't have an account with this provider,
- please contant your organization owner and ask about this.
+ please contact your organization owner and ask about this.
{% endblocktrans %}
{% else %}
diff --git a/readthedocs/vcs_support/backends/git.py b/readthedocs/vcs_support/backends/git.py
index ad62c44f0e2..e659fd96c1c 100644
--- a/readthedocs/vcs_support/backends/git.py
+++ b/readthedocs/vcs_support/backends/git.py
@@ -98,7 +98,7 @@ def validate_submodules(self, config):
.. note::
- Allways call after `self.are_submodules_available`.
+ Always call after `self.are_submodules_available`.
:returns: tuple(bool, list)
@@ -107,7 +107,7 @@ def validate_submodules(self, config):
- Include is `ALL`, returns all submodules available.
- Include is a list, returns just those.
- Exclude is `ALL` - this should never happen.
- - Exlude is a list, returns all available submodules
+ - Exclude is a list, returns all available submodules
but those from the list.
Returns `False` if at least one submodule is invalid.
@@ -206,7 +206,7 @@ def clone(self):
@property
def lsremote(self):
"""
- Use ``git ls-remote`` to list branches and tags without clonning the repository.
+ Use ``git ls-remote`` to list branches and tags without cloning the repository.
:returns: tuple containing a list of branch and tags
"""
@@ -242,7 +242,7 @@ def tags(self):
# GitPython is not very optimized for reading large numbers of tags
ref_cache = {} # 'ref/tags/' -> hexsha
# This code is the same that is executed for each tag in gitpython,
- # we excute it only once for all tags.
+ # we execute it only once for all tags.
for hexsha, ref in git.TagReference._iter_packed_refs(repo):
gitobject = git.Object.new_from_sha(repo, hex_to_bin(hexsha))
if gitobject.type == 'commit':
diff --git a/readthedocs/vcs_support/base.py b/readthedocs/vcs_support/base.py
index 9ed242266a7..0f2456a2ab1 100644
--- a/readthedocs/vcs_support/base.py
+++ b/readthedocs/vcs_support/base.py
@@ -45,7 +45,7 @@ class BaseVCS:
supports_branches = False # Whether this VCS supports branches or not.
supports_submodules = False
- # Whether this VCS supports listing remotes (branches, tags) without clonning
+ # Whether this VCS supports listing remotes (branches, tags) without cloning
supports_lsremote = False
# =========================================================================
@@ -67,7 +67,7 @@ def __init__(
self.verbose_name = verbose_name
self.version_type = version_type
- # TODO: always pass an explict environment
+ # TODO: always pass an explicit environment
# This is only used in tests #6546
from readthedocs.doc_builder.environments import LocalBuildEnvironment
self.environment = environment or LocalBuildEnvironment(record=False)