File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 88 if module_name .startswith (prefix ) and module_name != __spec__ .name
99]:
1010 del sys .modules [module_name ]
11-
12- from . latextools . utils . logging import logger , init_logger , shutdown_logger
11+ del globals ()[ "module_name" ]
12+ del globals ()[ "prefix" ]
1313
1414from .latextools .auto_label import (
1515 LatextoolsAutoInsertLabelCommand ,
132132)
133133
134134
135- def _filter_func (name ):
136- return name .startswith (prefix ) and name != __spec__ .name
137-
138-
139135def plugin_loaded ():
136+ from .latextools .utils .logging import init_logger
140137 init_logger ()
138+
139+ def _filter_func (name ):
140+ return name .startswith (__spec__ .parent + "." ) and name != __spec__ .name
141+
141142 for name in sorted (filter (_filter_func , sys .modules )):
142143 module = sys .modules [name ]
143144 if hasattr (module , "latextools_plugin_loaded" ):
144- logger .debug ("calling %s.latextools_plugin_loaded()" , name )
145145 module .latextools_plugin_loaded ()
146146
147147
148148def plugin_unloaded ():
149+ from .latextools .utils .logging import shutdown_logger
149150 shutdown_logger ()
You can’t perform that action at this time.
0 commit comments