M lazy-lock.json M lua/custom/configs/lspconfig.lua M lua/custom/init.lua A lua/custom/journal.lua A nvim_venv/bin/Activate.ps1 A nvim_venv/bin/activate A nvim_venv/bin/activate.csh A nvim_venv/bin/activate.fish
13 lines
400 B
Python
13 lines
400 B
Python
"""Functions that involve magic. """
|
|
|
|
def pollute(names, objects):
|
|
"""Pollute the global namespace with symbols -> objects mapping. """
|
|
from inspect import currentframe
|
|
frame = currentframe().f_back.f_back
|
|
|
|
try:
|
|
for name, obj in zip(names, objects):
|
|
frame.f_globals[name] = obj
|
|
finally:
|
|
del frame # break cyclic dependencies as stated in inspect docs
|