clearml_agent/commands/worker.py
def is_literal_script(task):
        # type: (tasks_api.Task) -> bool
        """
        Returns whether a task object represents a notebook task
        """
        script = task.script
        if not script:
            return False
        diff = script.diff
        if not diff:
            return False

        # test git diff prefix
        if diff.lstrip().lower().startswith("diff "):
            return False

        # test git submodule prefix
        # noinspection PyBroadException
        try:
            if diff.lstrip().lower().startswith("submodule ") and \
                    diff.splitlines()[1].lstrip().lower().startswith("diff "):
                return False
        except Exception:
            pass

        # none of the above
        return True

        Returns whether a task object represents a notebook task
        
Returns whether a task object represents a notebook task
Returns whether a task object represents a notebook task
def is_literal_script(task):
        script = task.script
        if not script:
            return False
        diff = script.diff
        if not diff:
            return False
        if diff.lstrip().lower().startswith("diff "):
            return False
        try:
            if diff.lstrip().lower().startswith("submodule ") and \
                    diff.splitlines()[1].lstrip().lower().startswith("diff "):
                return False
        except Exception:
            pass
        return True
def is_literal_script ( task ) : script = task . script if not script : return False diff = script . diff if not diff : return False if diff . lstrip ( ) . lower ( ) . startswith ( "diff " ) : return False try : if diff . lstrip ( ) . lower ( ) . startswith ( "submodule " ) and diff . splitlines ( ) [ 1 ] . lstrip ( ) . lower ( ) . startswith ( "diff " ) : return False except Exception : pass return True
Returns whether a task object represents a notebook task
Returns whether a task object represents a notebook task
# type: (tasks_api.Task) -> bool """
        Returns whether a task object represents a notebook task
        """ # test git diff prefix # test git submodule prefix # noinspection PyBroadException # none of the above
task