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

Member predicate Function::getEnclosingScope

Gets the scope in which this function occurs. This will be a class for a method, another function for nested functions, generator expressions or comprehensions, or a module for a plain function.

Scope getEnclosingScope()