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

Member predicate Scope::getScope

Gets the scope enclosing this scope (modules have no enclosing scope).

This method will be deprecated in the next release. Please use getEnclosingScope() instead. The reason for this is to avoid confusion around use of x.getScope+() where x might be an AstNode or a Variable. Forcing the users to write x.getScope().getEnclosingScope*() ensures that the apparent semantics and the actual semantics coincide.

Scope getScope()