def is_scratch(self, view):

        if view.is_scratch() or view.is_read_only() or view.window() is None or view.settings().get("repl") is not None:
            return True
        elif (
            view.file_name() and
            view.file_name().startswith(sublime.packages_path() + os.path.sep) and
            not os.path.exists(view.file_name())
        ):
            return True
        else:
            return False
Return whether a view is effectively scratch.
dataset/ETHPy150Open SublimeLinter/SublimeLinter3/sublimelinter.py/SublimeLinter.is_scratch