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 8
8
if module_name .startswith (prefix ) and module_name != __spec__ .name
9
9
]:
10
10
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" ]
13
13
14
14
from .latextools .auto_label import (
15
15
LatextoolsAutoInsertLabelCommand ,
132
132
)
133
133
134
134
135
- def _filter_func (name ):
136
- return name .startswith (prefix ) and name != __spec__ .name
137
-
138
-
139
135
def plugin_loaded ():
136
+ from .latextools .utils .logging import init_logger
140
137
init_logger ()
138
+
139
+ def _filter_func (name ):
140
+ return name .startswith (__spec__ .parent + "." ) and name != __spec__ .name
141
+
141
142
for name in sorted (filter (_filter_func , sys .modules )):
142
143
module = sys .modules [name ]
143
144
if hasattr (module , "latextools_plugin_loaded" ):
144
- logger .debug ("calling %s.latextools_plugin_loaded()" , name )
145
145
module .latextools_plugin_loaded ()
146
146
147
147
148
148
def plugin_unloaded ():
149
+ from .latextools .utils .logging import shutdown_logger
149
150
shutdown_logger ()
You can’t perform that action at this time.
0 commit comments