def update_usage_search_locations(self, platform: str):
'''Update the places where usages are found
Call this whenever you load new modules or scripts.
'''
if platform.lower().startswith('python'):
from . import jedi_dump
jedi_dump.JediCodeElementNode.usage_resolution_modules = (
frozenset((nn.module_context for nn in
tz.concatv(self.module_nodes[platform].values(),
self.script_nodes[platform].values())
if nn.code_element.path)))
评论列表
文章目录