summaryrefslogtreecommitdiff
path: root/jsonschema/_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'jsonschema/_utils.py')
-rw-r--r--jsonschema/_utils.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/jsonschema/_utils.py b/jsonschema/_utils.py
index 0af7355..54f9c22 100644
--- a/jsonschema/_utils.py
+++ b/jsonschema/_utils.py
@@ -120,25 +120,6 @@ def extras_msg(extras):
return ", ".join(repr(extra) for extra in extras), verb
-def types_msg(instance, types):
- """
- Create an error message for a failure to match the given types.
-
- If the ``instance`` is an object and contains a ``name`` property, it will
- be considered to be a description of that object and used as its type.
-
- Otherwise the message is simply the reprs of the given ``types``.
- """
-
- reprs = []
- for type in types:
- try:
- reprs.append(repr(type["name"]))
- except Exception:
- reprs.append(repr(type))
- return f"{instance!r} is not of type {', '.join(reprs)}"
-
-
def flatten(suitable_for_isinstance):
"""
isinstance() can accept a bunch of really annoying different types: