summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiyang Zhang <sudo.liyang@gmail.com>2023-03-20 02:07:23 -0500
committerGitHub <noreply@github.com>2023-03-20 08:07:23 +0100
commitf9f9215d3e5500d9a8d0bec0936480ba34d42e88 (patch)
treed5b1b014c7dd155ea466275cb37d906151d3ae13
parentb295b311712b598c053f7fa8cf6e6882217e35d9 (diff)
Fixed some typos in comments, docstrings, and tests.
-rw-r--r--.github/workflows/schedules.yml2
-rw-r--r--django/core/files/utils.py2
-rw-r--r--django/db/models/sql/query.py2
-rw-r--r--docs/conf.py2
-rw-r--r--tests/asgi/tests.py2
-rw-r--r--tests/auth_tests/test_hashers.py2
-rw-r--r--tests/file_storage/test_inmemory_storage.py2
-rw-r--r--tests/fixtures_regress/tests.py2
-rw-r--r--tests/template_tests/tests.py2
9 files changed, 9 insertions, 9 deletions
diff --git a/.github/workflows/schedules.yml b/.github/workflows/schedules.yml
index bd9cced240..f1079606a7 100644
--- a/.github/workflows/schedules.yml
+++ b/.github/workflows/schedules.yml
@@ -42,5 +42,5 @@ jobs:
ref: '${{ matrix.branch }}',
})
} else {
- console.log(`No commits found since ${yesterday} on brach ${{ matrix.branch }}`)
+ console.log(`No commits found since ${yesterday} on branch ${{ matrix.branch }}`)
}
diff --git a/django/core/files/utils.py b/django/core/files/utils.py
index 85342b2f3f..611f932f6e 100644
--- a/django/core/files/utils.py
+++ b/django/core/files/utils.py
@@ -26,7 +26,7 @@ def validate_file_name(name, allow_relative_path=False):
class FileProxyMixin:
"""
- A mixin class used to forward file methods to an underlaying file
+ A mixin class used to forward file methods to an underlying file
object. The internal file object has to be called "file"::
class FileProxy(FileProxyMixin):
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index 0aa07e0b99..103fffa47d 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -699,7 +699,7 @@ class Query(BaseExpression):
# All concrete fields that are not part of the defer mask must be
# loaded. If a relational field is encountered it gets added to the
# mask for it be considered if `select_related` and the cycle continues
- # by recursively caling this function.
+ # by recursively calling this function.
for field in opts.concrete_fields:
field_mask = mask.pop(field.name, None)
if field_mask is None:
diff --git a/docs/conf.py b/docs/conf.py
index 1fbf38f23e..3d337a6602 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -404,7 +404,7 @@ epub_cover = ("", "epub-cover.html")
# The format is a list of tuples containing the path and title.
# epub_pre_files = []
-# HTML files shat should be inserted after the pages created by sphinx.
+# HTML files that should be inserted after the pages created by sphinx.
# The format is a list of tuples containing the path and title.
# epub_post_files = []
diff --git a/tests/asgi/tests.py b/tests/asgi/tests.py
index 61d040b45b..824f396e00 100644
--- a/tests/asgi/tests.py
+++ b/tests/asgi/tests.py
@@ -61,7 +61,7 @@ class ASGITest(SimpleTestCase):
# Python's file API is not async compatible. A third-party library such
# as https://github.com/Tinche/aiofiles allows passing the file to
- # FileResponse as an async interator. With a sync iterator
+ # FileResponse as an async iterator. With a sync iterator
# StreamingHTTPResponse triggers a warning when iterating the file.
# assertWarnsMessage is not async compatible, so ignore_warnings for the
# test.
diff --git a/tests/auth_tests/test_hashers.py b/tests/auth_tests/test_hashers.py
index e41fbf9b78..d1c26cfaa8 100644
--- a/tests/auth_tests/test_hashers.py
+++ b/tests/auth_tests/test_hashers.py
@@ -345,7 +345,7 @@ class TestUtilsHashPass(SimpleTestCase):
self.assertFalse(check_password("", encoded))
self.assertFalse(check_password("lètmein", encoded))
self.assertFalse(check_password("lètmeinz", encoded))
- with self.assertRaisesMessage(ValueError, "Unknown password hashing algorith"):
+ with self.assertRaisesMessage(ValueError, "Unknown password hashing algorithm"):
identify_hasher(encoded)
# Assert that the unusable passwords actually contain a random part.
# This might fail one day due to a hash collision.
diff --git a/tests/file_storage/test_inmemory_storage.py b/tests/file_storage/test_inmemory_storage.py
index b1d2e2e5a1..13ae9b9482 100644
--- a/tests/file_storage/test_inmemory_storage.py
+++ b/tests/file_storage/test_inmemory_storage.py
@@ -161,7 +161,7 @@ class MemoryStorageTimesTests(unittest.TestCase):
self.assertTrue(new_modified_time > modified_time)
def test_file_accessed_time(self):
- """File accessed time should chage after consecutive opening."""
+ """File accessed time should change after consecutive opening."""
self.storage.save("file.txt", ContentFile("test"))
accessed_time = self.storage.get_accessed_time("file.txt")
diff --git a/tests/fixtures_regress/tests.py b/tests/fixtures_regress/tests.py
index 1fc7e94e0b..54d7cac50a 100644
--- a/tests/fixtures_regress/tests.py
+++ b/tests/fixtures_regress/tests.py
@@ -811,7 +811,7 @@ class NaturalKeyFixtureOnOtherDatabaseTests(TestCase):
def test_natural_key_dependencies(self):
"""
- Natural keys with foreing keys in dependencies works in a multiple
+ Natural keys with foreign keys in dependencies works in a multiple
database setup.
"""
management.call_command(
diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py
index f35ae49ca3..d9bdd6e68f 100644
--- a/tests/template_tests/tests.py
+++ b/tests/template_tests/tests.py
@@ -31,7 +31,7 @@ class TemplateTestMixin:
def test_url_reverse_view_name(self):
"""
- #19827 -- url tag should keep original strack trace when reraising
+ #19827 -- url tag should keep original stack trace when reraising
exception.
"""
t = self._engine().from_string("{% url will_not_match %}")