MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / walk_subclasses

Function walk_subclasses

lib/sqlalchemy/util/langhelpers.py:170–181  ·  view source on GitHub ↗
(cls: Type[_T])

Source from the content-addressed store, hash-verified

168
169
170def walk_subclasses(cls: Type[_T]) -> Iterator[Type[_T]]:
171 seen: Set[Any] = set()
172
173 stack = [cls]
174 while stack:
175 cls = stack.pop()
176 if cls in seen:
177 continue
178 else:
179 seen.add(cls)
180 stack.extend(cls.__subclasses__())
181 yield cls
182
183
184def string_or_unprintable(element: Any) -> str:

Callers

nothing calls this directly

Calls 3

popMethod · 0.45
addMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected