diff options
-rw-r--r-- | jsonschema/_utils.py | 23 | ||||
-rw-r--r-- | jsonschema/tests/_suite.py | 6 |
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, |