CodeQL library for Python
codeql/python-all 3.0.1-dev (changelog, source)
Search

Predicate getADirectSubclass

Gets a direct subclass of the argument cls, if any.

For B with the class definition class A(B) it will have result A.

Import path

import semmle.python.dataflow.new.internal.DataFlowDispatch
Class getADirectSubclass(Class cls)