MCPcopy Create free account
hub / github.com/deepnote/deepnote / __init__

Method __init__

packages/reactivity/src/scripts/ast-analyzer.py:15–21  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13
14class 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected