File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ def get_requirements(cls) -> List[interfaces.configuration.RequirementInterface]
5858 ]
5959
6060 def run (
61- self , additional_locals : Dict [str , Any ] = None
61+ self , additional_locals : Dict [str , Any ] = {}
6262 ) -> interfaces .renderers .TreeGrid :
6363 """Runs the interactive volshell plugin.
6464
@@ -94,7 +94,10 @@ def run(
9494"""
9595
9696 sys .ps1 = f"({ self .current_layer } ) >>> "
97- self .__console = code .InteractiveConsole (locals = self ._construct_locals_dict ())
97+ # Dict self._construct_locals_dict() will have priority on keys
98+ combined_locals = self ._construct_locals_dict ().copy ()
99+ combined_locals .update (additional_locals )
100+ self .__console = code .InteractiveConsole (locals = combined_locals )
98101 # Since we have to do work to add the option only once for all different modes of volshell, we can't
99102 # rely on the default having been set
100103 if self .config .get ("script" , None ) is not None :
You can’t perform that action at this time.
0 commit comments