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

Predicate API::Impl::prefix_member

Holds if the dotted module name sub refers to the member member of base.

For instance, prefix_member("foo.bar", "baz", "foo.bar.baz") would hold.

Import path

import semmle.python.ApiGraphs
predicate prefix_member(TApiNode base, string member, TApiNode sub)