linting.py 文件源码

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

项目:sublimeTextConfig 作者: luoye-fe 项目源码 文件源码
def lint(self) -> None:
        view = sublime.active_window().active_view()
        if get_settings(view, 'anaconda_linting_behaviour') != 'always':
            if not self.check_auto_lint:
                self.check_auto_lint = True
            return

        delay = get_settings(view, 'anaconda_linter_delay', 0.5)
        valid_code = is_code(view, lang=self.lang.lower())
        if not ANACONDA['ALREADY_LINTED'] and valid_code:
            if time.time() - ANACONDA['LAST_PULSE'] >= delay:
                ANACONDA['ALREADY_LINTED'] = True
                self.run_linter(view)

        if not self._force_non_auto:
            sublime.set_timeout(lambda: self.lint(), int(delay * 1000))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号