Skip to content

Commit 40091fd

Browse files
committed
[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 ^^^
1 parent bb2be66 commit 40091fd

File tree

15 files changed

+20
-20
lines changed

15 files changed

+20
-20
lines changed

readthedocs/api/v2/views/model_views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ class NotificationViewSet(DisableListEndpoint, CreateModelMixin, UserSelectViewS
452452
453453
This endpoint is currently used only internally by the builder.
454454
Notifications are attached to `Build` objects only when using this endpoint.
455-
This limitation will change in the future when re-implementing this on APIv3 if neeed.
455+
This limitation will change in the future when re-implementing this on APIv3 if needed.
456456
"""
457457

458458
parser_classes = [JSONParser, MultiPartParser]

readthedocs/api/v3/permissions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class HasEmbedAPIAccess(BasePermission):
88
"""
99
Check if the project being accessed has access to the Embed API.
1010
11-
The embedded API V3 allows getting content from external sites tha
11+
The embedded API V3 allows getting content from external sites that
1212
aren't attached to a project. Those sites are restricted to the ones
1313
from ``RTD_EMBED_API_EXTERNAL_DOMAINS``, so we just allow that.
1414
"""

readthedocs/core/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class NullCharactersMiddleware:
1414
when trying to save the content containing a NULL character into the
1515
database, producing a 500 and creating an event in Sentry.
1616
17-
NULL characters are also used as an explotation technique, known as "Null Byte Injection".
17+
NULL characters are also used as an exploitation technique, known as "Null Byte Injection".
1818
"""
1919

2020
def __init__(self, get_response):

readthedocs/core/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def extract_valid_attributes_for_model(model, attributes):
390390
attributes = attributes.copy()
391391
valid_field_names = {field.name for field in model._meta.get_fields()}
392392
valid_attributes = {}
393-
# We can't change a dictionary while interating over its keys,
393+
# We can't change a dictionary while iterating over its keys,
394394
# so we make a copy of its keys.
395395
keys = list(attributes.keys())
396396
for key in keys:

readthedocs/doc_builder/backends/sphinx.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(self, *args, **kwargs):
4444
# `absolute_host_output_dir` because it's not defined in the host. So,
4545
# we have to re-calculate its value. We will remove this limitation
4646
# when we execute the whole building from inside the Docker container
47-
# (instead behing a hybrid as it is now)
47+
# (instead being a hybrid as it is now)
4848
#
4949
# We need to have two different paths that point to the exact same
5050
# directory. How is that? The directory is mounted into a different
@@ -95,7 +95,7 @@ def __init__(self, *args, **kwargs):
9595
#
9696
# IMO, if there are multiple config files,
9797
# the build should fail immediately communicating this to the user.
98-
# This can be achived by unhandle the exception here
98+
# This can be achieved by unhandle the exception here
9999
# and leaving `on_failure` Celery handle to deal with it.
100100
#
101101
# In case there is no config file, we should continue the build
@@ -152,7 +152,7 @@ def build(self):
152152
f"language={language}",
153153
# Sphinx's source directory (SOURCEDIR).
154154
# We are executing this command at the location of the `conf.py` file (CWD).
155-
# TODO: ideally we should execute it from where the repository was clonned,
155+
# TODO: ideally we should execute it from where the repository was cloned,
156156
# but that could lead unexpected behavior to some users:
157157
# https://github.com/readthedocs/readthedocs.org/pull/9888#issuecomment-1384649346
158158
".",
@@ -321,7 +321,7 @@ def build(self):
321321
f"language={language}",
322322
# Sphinx's source directory (SOURCEDIR).
323323
# We are executing this command at the location of the `conf.py` file (CWD).
324-
# TODO: ideally we should execute it from where the repository was clonned,
324+
# TODO: ideally we should execute it from where the repository was cloned,
325325
# but that could lead unexpected behavior to some users:
326326
# https://github.com/readthedocs/readthedocs.org/pull/9888#issuecomment-1384649346
327327
".",

readthedocs/projects/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ def get_downloads(self):
905905

906906
@property
907907
def clean_repo(self):
908-
# NOTE: this method is used only when the project is going to be clonned.
908+
# NOTE: this method is used only when the project is going to be cloned.
909909
# It probably makes sense to do a data migrations and force "Import Project"
910910
# form to validate it's an HTTPS URL when importing new ones
911911
if self.repo.startswith("http://github.com"):

readthedocs/projects/tasks/builds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ def update_build(self, state=None):
789789
log.exception("Error while updating the build object.", state=state)
790790

791791
def execute(self):
792-
# Clonning
792+
# Cloning
793793
self.update_build(state=BUILD_STATE_CLONING)
794794

795795
# TODO: remove the ``create_vcs_environment`` hack. Ideally, this should be

readthedocs/projects/tasks/search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def _get_indexers(*, version: Version, build: Build, search_index_name=None):
159159
indexers = []
160160
# NOTE: The search indexer must be before the index file indexer.
161161
# This is because saving the objects in the DB will give them an id,
162-
# and we neeed this id to be `None` when indexing the objects in ES.
162+
# and we need this id to be `None` when indexing the objects in ES.
163163
# ES will generate a unique id for each document.
164164
# NOTE: If the version is external, we don't create a search index for it.
165165
if not version.is_external:

readthedocs/projects/tests/test_build_tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,7 @@ def test_build_commands_executed_with_clone_token(
14011401
os.makedirs(self.project.artifact_path(version=self.version.slug, type_="epub"))
14021402
os.makedirs(self.project.artifact_path(version=self.version.slug, type_="pdf"))
14031403

1404-
get_clone_token.return_value = "toke:1234"
1404+
get_clone_token.return_value = "token:1234"
14051405
github_app_installation = get(
14061406
GitHubAppInstallation,
14071407
installation_id=1234,

readthedocs/projects/version_handling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def sort_versions(version_list):
106106
107107
:returns: sorted list in descending order (latest version first) of versions
108108
109-
:rtype: list(tupe(readthedocs.builds.models.Version,
109+
:rtype: list(tuple(readthedocs.builds.models.Version,
110110
packaging.version.Version))
111111
"""
112112
versions = []

0 commit comments

Comments
 (0)