1
0
mirror of https://github.com/django/django.git synced 2025-01-03 15:06:09 +00:00

Fixed some typos in comments, docstrings, and tests.

This commit is contained in:
Liyang Zhang 2023-03-20 02:07:23 -05:00 committed by GitHub
parent b295b31171
commit f9f9215d3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 9 additions and 9 deletions

View File

@ -42,5 +42,5 @@ jobs:
ref: '${{ matrix.branch }}', ref: '${{ matrix.branch }}',
}) })
} else { } else {
console.log(`No commits found since ${yesterday} on brach ${{ matrix.branch }}`) console.log(`No commits found since ${yesterday} on branch ${{ matrix.branch }}`)
} }

View File

@ -26,7 +26,7 @@ def validate_file_name(name, allow_relative_path=False):
class FileProxyMixin: 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":: object. The internal file object has to be called "file"::
class FileProxy(FileProxyMixin): class FileProxy(FileProxyMixin):

View File

@ -699,7 +699,7 @@ class Query(BaseExpression):
# All concrete fields that are not part of the defer mask must be # 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 # loaded. If a relational field is encountered it gets added to the
# mask for it be considered if `select_related` and the cycle continues # 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: for field in opts.concrete_fields:
field_mask = mask.pop(field.name, None) field_mask = mask.pop(field.name, None)
if field_mask is None: if field_mask is None:

View File

@ -404,7 +404,7 @@ epub_cover = ("", "epub-cover.html")
# The format is a list of tuples containing the path and title. # The format is a list of tuples containing the path and title.
# epub_pre_files = [] # 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. # The format is a list of tuples containing the path and title.
# epub_post_files = [] # epub_post_files = []

View File

@ -61,7 +61,7 @@ class ASGITest(SimpleTestCase):
# Python's file API is not async compatible. A third-party library such # Python's file API is not async compatible. A third-party library such
# as https://github.com/Tinche/aiofiles allows passing the file to # 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. # StreamingHTTPResponse triggers a warning when iterating the file.
# assertWarnsMessage is not async compatible, so ignore_warnings for the # assertWarnsMessage is not async compatible, so ignore_warnings for the
# test. # test.

View File

@ -345,7 +345,7 @@ class TestUtilsHashPass(SimpleTestCase):
self.assertFalse(check_password("", encoded)) self.assertFalse(check_password("", encoded))
self.assertFalse(check_password("lètmein", encoded)) self.assertFalse(check_password("lètmein", encoded))
self.assertFalse(check_password("lètmeinz", 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) identify_hasher(encoded)
# Assert that the unusable passwords actually contain a random part. # Assert that the unusable passwords actually contain a random part.
# This might fail one day due to a hash collision. # This might fail one day due to a hash collision.

View File

@ -161,7 +161,7 @@ class MemoryStorageTimesTests(unittest.TestCase):
self.assertTrue(new_modified_time > modified_time) self.assertTrue(new_modified_time > modified_time)
def test_file_accessed_time(self): 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")) self.storage.save("file.txt", ContentFile("test"))
accessed_time = self.storage.get_accessed_time("file.txt") accessed_time = self.storage.get_accessed_time("file.txt")

View File

@ -811,7 +811,7 @@ class NaturalKeyFixtureOnOtherDatabaseTests(TestCase):
def test_natural_key_dependencies(self): 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. database setup.
""" """
management.call_command( management.call_command(

View File

@ -31,7 +31,7 @@ class TemplateTestMixin:
def test_url_reverse_view_name(self): 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. exception.
""" """
t = self._engine().from_string("{% url will_not_match %}") t = self._engine().from_string("{% url will_not_match %}")