core.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:SublimeGotoUsage 作者: syko 项目源码 文件源码
def get_usages_in_files(subject, files):
    """
    Smart approach: reads files from a list and parses them.
    """

    usage_list = []

    for file_path in files:
        try:
            usages = get_usages_in_file(file_path, subject)
            usage_list.extend(usages)
        except UnicodeDecodeError:
            utils.log("Failed to open file", file_path, warning=True)
        except FileNotFoundError:
            utils.log("File not found", file_path, warning=True)
            utils.log("Probably the file has been (re)moved and the dependency graph is stale. Please rebuild!", warning=True)
            sublime.active_window().status_message("GotoUsage Error! Dependency graph looks out of date. Please rebuild!")

    return usage_list
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号