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

Member predicate Scope::isTopLevel

Holds if this a top-level (non-nested) class or function

predicate isTopLevel()