Test for global variables for case when running without ignore-global-vars.
MY_CONSTANT = 42 # insert
MY_OTHER_CONSTANT = "hello" # insertDEBUG = True # insertMY_CONSTANT = 42 # insert
global_var = "hello"
def foo():
local_var = 1 # insertMY_CONSTANT: typing.Final = 42
MY_OTHER_CONSTANT = "hello" # insertMY_CONSTANT: int = 42 # insert
MY_OTHER_CONSTANT = "hello" # insertMY_CONSTANT = 42 # insert
def foo():
MY_CONSTANT = 1 # insert
local_var = 2 # insertFRUIT = Apple | Banana # insertglobal_var = 42myVar = "hello"A = 42MY_CONSTANT = 42
def foo():
global MY_CONSTANT
MY_CONSTANT = 1from foo import MY_CONSTANT
MY_CONSTANT = 42a: typing.Final = 1_T = typing.TypeVar("_T")_T: typing.Final = typing.TypeVar("_T")_P = typing.ParamSpec("_P")_P: typing.Final = typing.ParamSpec("_P")Fruit = Apple | BananaA = "ParamSpec"