File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-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
+ prefix = __spec__ .parent + "."
140
+
141
+ def _filter_func (name ):
142
+ return name .startswith (prefix ) and name != __spec__ .name
143
+
141
144
for name in sorted (filter (_filter_func , sys .modules )):
142
145
module = sys .modules [name ]
143
146
if hasattr (module , "latextools_plugin_loaded" ):
144
- logger .debug ("calling %s.latextools_plugin_loaded()" , name )
145
147
module .latextools_plugin_loaded ()
146
148
147
149
148
150
def plugin_unloaded ():
151
+ from .latextools .utils .logging import shutdown_logger
149
152
shutdown_logger ()
You can’t perform that action at this time.
0 commit comments