summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2021-08-25 10:57:57 +0100
committerJulian Berman <Julian@GrayVines.com>2021-08-25 10:57:57 +0100
commitdddac11d8b96dbbf95dfddcff6a0507ff302a48d (patch)
tree75e3670a789a274d0bc85fa7be54b90829ca5703
parentf27e7dc1ad37fbbc5161a60c7c7f7c257613ee49 (diff)
downloadjsonschema-dddac11d8b96dbbf95dfddcff6a0507ff302a48d.tar.gz
Remove more dead code.
-rw-r--r--jsonschema/_utils.py23
-rw-r--r--jsonschema/tests/_suite.py6
2 files changed, 0 insertions, 29 deletions
diff --git a/jsonschema/_utils.py b/jsonschema/_utils.py
index 47a1b32..f3603c5 100644
--- a/jsonschema/_utils.py
+++ b/jsonschema/_utils.py
@@ -124,29 +124,6 @@ def extras_msg(extras):
return ", ".join(repr(extra) for extra in extras), verb
-def flatten(suitable_for_isinstance):
- """
- isinstance() can accept a bunch of really annoying different types:
-
- * a single type
- * a tuple of types
- * an arbitrary nested tree of tuples
-
- Return a flattened tuple of the given argument.
- """
-
- types = set()
-
- if not isinstance(suitable_for_isinstance, tuple):
- suitable_for_isinstance = (suitable_for_isinstance,)
- for thing in suitable_for_isinstance:
- if isinstance(thing, tuple):
- types.update(flatten(thing))
- else:
- types.add(thing)
- return tuple(types)
-
-
def ensure_list(thing):
"""
Wrap ``thing`` in a list if it's a single str.
diff --git a/jsonschema/tests/_suite.py b/jsonschema/tests/_suite.py
index e24e41e..8d36490 100644
--- a/jsonschema/tests/_suite.py
+++ b/jsonschema/tests/_suite.py
@@ -102,12 +102,6 @@ class Version(object):
)
)
- def tests_of(self, name):
- return self._tests_in(
- subject=name,
- path=self._path / (name + ".json"),
- )
-
def optional_tests_of(self, name):
return self._tests_in(
subject=name,