linting.py 文件源码

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

项目:sublimeTextConfig 作者: luoye-fe 项目源码 文件源码
def on_modified(self, view: sublime.View) -> None:
        """
        Called after changes have been made to a view.
        Runs in a separate thread, and does not block the application.
        """

        constraints = ONLY_CODE | NOT_SCRATCH | LINTING_ENABLED
        if check_linting(view, constraints, code=self.lang.lower()):
            # remove previous linting marks if configured to do so
            if not get_settings(view, 'anaconda_linter_persistent', False):
                erase_lint_marks(view)

            # check lint behavior and lint if always and auto lint is set
            if check_linting_behaviour(view, ['always']):
                # update the last selected line number
                self.last_selected_line = -1
                ANACONDA['LAST_PULSE'] = time.time()
                ANACONDA['ALREADY_LINTED'] = False
                if self.check_auto_lint:
                    self.lint()
        else:
            self._erase_marks_if_no_linting(view)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号