(self)
| 13 | |
| 14 | class VariableVisitor(ast.NodeVisitor): |
| 15 | def __init__(self) -> None: |
| 16 | self.global_vars = set() # Variables defined globally |
| 17 | self.used_global_vars = set() # Variables used and defined globally |
| 18 | self.imported_modules = set() # Local names introduced by imports (aliases) |
| 19 | self.imported_packages = set() # Top-level package names from import sources |
| 20 | self.scope_stack = [] # Stack to track scopes |
| 21 | self.function_globals = set() # Global variables declared in current function |
| 22 | |
| 23 | def current_scope_is_global(self): |
| 24 | # If the scope stack is empty, we are at the global level |
nothing calls this directly
no outgoing calls
no test coverage detected