Skip to content

Commit dddac11

Browse files
committed
Remove more dead code.
1 parent f27e7dc commit dddac11

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

jsonschema/_utils.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -124,29 +124,6 @@ def extras_msg(extras):
124124
return ", ".join(repr(extra) for extra in extras), verb
125125

126126

127-
def flatten(suitable_for_isinstance):
128-
"""
129-
isinstance() can accept a bunch of really annoying different types:
130-
131-
* a single type
132-
* a tuple of types
133-
* an arbitrary nested tree of tuples
134-
135-
Return a flattened tuple of the given argument.
136-
"""
137-
138-
types = set()
139-
140-
if not isinstance(suitable_for_isinstance, tuple):
141-
suitable_for_isinstance = (suitable_for_isinstance,)
142-
for thing in suitable_for_isinstance:
143-
if isinstance(thing, tuple):
144-
types.update(flatten(thing))
145-
else:
146-
types.add(thing)
147-
return tuple(types)
148-
149-
150127
def ensure_list(thing):
151128
"""
152129
Wrap ``thing`` in a list if it's a single str.

jsonschema/tests/_suite.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@ def format_tests(self):
102102
)
103103
)
104104

105-
def tests_of(self, name):
106-
return self._tests_in(
107-
subject=name,
108-
path=self._path / (name + ".json"),
109-
)
110-
111105
def optional_tests_of(self, name):
112106
return self._tests_in(
113107
subject=name,

0 commit comments

Comments
 (0)