summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAdam Taylor <ataylor32@gmail.com>2015-01-20 07:54:12 -0700
committerTim Graham <timograham@gmail.com>2015-01-20 12:18:29 -0500
commit45aaced91e4789c3a08b17f0908010923361dbec (patch)
treef15fcd7d2a029c173f402083b51d7419b0031008 /django
parent90d9bf5ba46f806e7d4a7d19023f8d19028c4a27 (diff)
[1.8.x] Fixed typos in code comments.
Backport of 039465a6a7a18f48ea77ceadb6949990c0ec92e1 from master
Diffstat (limited to 'django')
-rw-r--r--django/contrib/auth/tests/test_hashers.py4
-rw-r--r--django/contrib/gis/geos/tests/test_geos.py2
-rw-r--r--django/contrib/gis/tests/geoapp/test_regress.py2
-rw-r--r--django/contrib/gis/tests/geoapp/tests.py4
-rw-r--r--django/db/backends/base/creation.py2
-rw-r--r--django/db/migrations/loader.py2
-rw-r--r--django/db/migrations/optimizer.py2
-rw-r--r--django/forms/models.py2
-rw-r--r--django/utils/regex_helper.py2
9 files changed, 11 insertions, 11 deletions
diff --git a/django/contrib/auth/tests/test_hashers.py b/django/contrib/auth/tests/test_hashers.py
index 10ab657ae5..0c280ae158 100644
--- a/django/contrib/auth/tests/test_hashers.py
+++ b/django/contrib/auth/tests/test_hashers.py
@@ -269,7 +269,7 @@ class TestUtilsHashPass(SimpleTestCase):
def setter(password):
state['upgraded'] = True
- # Check that no upgrade is triggerd
+ # Check that no upgrade is triggered
self.assertTrue(check_password('letmein', encoded, setter))
self.assertFalse(state['upgraded'])
@@ -298,7 +298,7 @@ class TestUtilsHashPass(SimpleTestCase):
algo, iterations, salt, hash = encoded.split('$', 3)
self.assertEqual(iterations, '1')
- # Check that no upgrade is triggerd
+ # Check that no upgrade is triggered
self.assertTrue(check_password('letmein', encoded, setter))
self.assertFalse(state['upgraded'])
diff --git a/django/contrib/gis/geos/tests/test_geos.py b/django/contrib/gis/geos/tests/test_geos.py
index 9d093bfa32..48d4aabf13 100644
--- a/django/contrib/gis/geos/tests/test_geos.py
+++ b/django/contrib/gis/geos/tests/test_geos.py
@@ -63,7 +63,7 @@ class GEOSTest(unittest.TestCase, TestDataMixin):
# Anything that is either not None or the acceptable pointer type will
# result in a TypeError when trying to assign it to the `ptr` property.
- # Thus, memmory addresses (integers) and pointers of the incorrect type
+ # Thus, memory addresses (integers) and pointers of the incorrect type
# (in `bad_ptrs`) will not be allowed.
bad_ptrs = (5, ctypes.c_char_p(b'foobar'))
for bad_ptr in bad_ptrs:
diff --git a/django/contrib/gis/tests/geoapp/test_regress.py b/django/contrib/gis/tests/geoapp/test_regress.py
index e5cefb0752..85dc1c139a 100644
--- a/django/contrib/gis/tests/geoapp/test_regress.py
+++ b/django/contrib/gis/tests/geoapp/test_regress.py
@@ -83,7 +83,7 @@ class GeoRegressionTests(TestCase):
val1 = Truth.objects.get(pk=t1.pk).val
val2 = Truth.objects.get(pk=t2.pk).val
- # verify types -- should't be 0/1
+ # verify types -- shouldn't be 0/1
self.assertIsInstance(val1, bool)
self.assertIsInstance(val2, bool)
# verify values
diff --git a/django/contrib/gis/tests/geoapp/tests.py b/django/contrib/gis/tests/geoapp/tests.py
index 0dc4ce269d..31a2694421 100644
--- a/django/contrib/gis/tests/geoapp/tests.py
+++ b/django/contrib/gis/tests/geoapp/tests.py
@@ -456,7 +456,7 @@ class GeoQuerySetTest(TestCase):
geom = Point(5, 23)
qs = Country.objects.all().difference(geom).sym_difference(geom).union(geom)
- # XXX For some reason SpatiaLite does something screwey with the Texas geometry here. Also,
+ # XXX For some reason SpatiaLite does something screwy with the Texas geometry here. Also,
# XXX it doesn't like the null intersection.
if spatialite:
qs = qs.exclude(name='Texas')
@@ -599,7 +599,7 @@ class GeoQuerySetTest(TestCase):
@skipUnlessDBFeature("has_gml_method")
def test_gml(self):
"Testing GML output from the database using GeoQuerySet.gml()."
- # Should throw a TypeError when tyring to obtain GML from a
+ # Should throw a TypeError when trying to obtain GML from a
# non-geometry field.
qs = City.objects.all()
self.assertRaises(TypeError, qs.gml, field_name='name')
diff --git a/django/db/backends/base/creation.py b/django/db/backends/base/creation.py
index 5044fcfb6c..35cabba0cf 100644
--- a/django/db/backends/base/creation.py
+++ b/django/db/backends/base/creation.py
@@ -409,7 +409,7 @@ class BaseDatabaseCreation(object):
queryset = model._default_manager.using(self.connection.alias).order_by(model._meta.pk.name)
for obj in queryset.iterator():
yield obj
- # Serialise to a string
+ # Serialize to a string
out = StringIO()
serializers.serialize("json", get_objects(), indent=None, stream=out)
return out.getvalue()
diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py
index 51fb2783eb..d7ee805bb1 100644
--- a/django/db/migrations/loader.py
+++ b/django/db/migrations/loader.py
@@ -195,7 +195,7 @@ class MigrationLoader(object):
for key, migration in normal.items():
for parent in migration.dependencies:
reverse_dependencies.setdefault(parent, set()).add(key)
- # Remeber the possible replacements to generate more meaningful error
+ # Remember the possible replacements to generate more meaningful error
# messages
reverse_replacements = {}
for key, migration in replacing.items():
diff --git a/django/db/migrations/optimizer.py b/django/db/migrations/optimizer.py
index c39bf15453..8c5ee71819 100644
--- a/django/db/migrations/optimizer.py
+++ b/django/db/migrations/optimizer.py
@@ -229,7 +229,7 @@ class MigrationOptimizer(object):
def reduce_create_model_add_field(self, operation, other, in_between):
if operation.name_lower == other.model_name_lower:
- # Don't allow optimisations of FKs through models they reference
+ # Don't allow optimizations of FKs through models they reference
if hasattr(other.field, "rel") and other.field.rel:
for between in in_between:
# Check that it doesn't point to the model
diff --git a/django/forms/models.py b/django/forms/models.py
index 1ec1398147..b7068e8c75 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -540,7 +540,7 @@ def modelform_factory(model, form=ModelForm, fields=None, exclude=None,
"'exclude' explicitly is prohibited."
)
- # Instatiate type(form) in order to use the same metaclass as form.
+ # Instantiate type(form) in order to use the same metaclass as form.
return type(form)(class_name, (form,), form_class_attrs)
diff --git a/django/utils/regex_helper.py b/django/utils/regex_helper.py
index a43234ad05..53736dffa7 100644
--- a/django/utils/regex_helper.py
+++ b/django/utils/regex_helper.py
@@ -165,7 +165,7 @@ def normalize(pattern):
else:
result.append(Group((("%%(%s)s" % param), None)))
elif ch in "*?+{":
- # Quanitifers affect the previous item in the result list.
+ # Quantifiers affect the previous item in the result list.
count, ch = get_quantifier(ch, pattern_iter)
if ch:
# We had to look ahead, but it wasn't need to compute the