summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Gates <tim.gates@iress.com>2022-07-13 22:30:11 +1000
committerGitHub <noreply@github.com>2022-07-13 14:30:11 +0200
commit41184fef85909c7500db44c5a254cd61425840c7 (patch)
tree85138e178b4ff7ef7343fdc6c4f8ec99228fe135
parent2466ee2ffe901cd3df3f8675c1f21b4786b5b58e (diff)
downloadvoluptuous-41184fef85909c7500db44c5a254cd61425840c7.tar.gz
Fix a few typos (#470)
-rw-r--r--voluptuous/schema_builder.py2
-rw-r--r--voluptuous/tests/tests.py4
-rw-r--r--voluptuous/validators.py4
3 files changed, 5 insertions, 5 deletions
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py
index 29766db..0cb207f 100644
--- a/voluptuous/schema_builder.py
+++ b/voluptuous/schema_builder.py
@@ -866,7 +866,7 @@ def _compile_itemsort():
for i, check_ in priority:
if check_(key_):
return i
- # values have hightest priorities
+ # values have highest priorities
return 0
return item_priority
diff --git a/voluptuous/tests/tests.py b/voluptuous/tests/tests.py
index 1ac99d3..58512df 100644
--- a/voluptuous/tests/tests.py
+++ b/voluptuous/tests/tests.py
@@ -115,7 +115,7 @@ def test_remove():
# remove keys by type
schema = Schema({"weight": float,
"amount": int,
- # remvove str keys with int values
+ # remove str keys with int values
Remove(str): int,
# keep str keys with str values
str: str})
@@ -1647,7 +1647,7 @@ def test_object():
pytest.raises(MultipleInvalid, s, 345)
-# Python 3.7 removed the trainling comma in repr() of BaseException
+# Python 3.7 removed the trailing comma in repr() of BaseException
# https://bugs.python.org/issue30399
if sys.version_info >= (3, 7):
invalid_scalar_excp_repr = "ScalarInvalid('not a valid value')"
diff --git a/voluptuous/validators.py b/voluptuous/validators.py
index 9019f1f..35a80e6 100644
--- a/voluptuous/validators.py
+++ b/voluptuous/validators.py
@@ -689,7 +689,7 @@ class Length(object):
self.msg or 'length of value must be at most %s' % self.max)
return v
- # Objects that havbe no length e.g. None or strings will raise TypeError
+ # Objects that have no length e.g. None or strings will raise TypeError
except TypeError:
raise RangeInvalid(
self.msg or 'invalid value or type')
@@ -845,7 +845,7 @@ class ExactSequence(object):
class Unique(object):
"""Ensure an iterable does not contain duplicate items.
- Only iterables convertable to a set are supported (native types and
+ Only iterables convertible to a set are supported (native types and
objects with correct __eq__).
JSON does not support set, so they need to be presented as arrays.