Exemple #1
0
def merge_info(app: Sphinx, env: BuildEnvironment, docnames: Iterable[str],
               other: BuildEnvironment) -> None:
    warnings.warn('merge_info() is deprecated.', RemovedInSphinx40Warning)
    if not hasattr(other, 'todo_all_todos'):
        return
    if not hasattr(env, 'todo_all_todos'):
        env.todo_all_todos = []  # type: ignore
    env.todo_all_todos.extend(other.todo_all_todos)  # type: ignore
Exemple #2
0
def purge_todos(app: Sphinx, env: BuildEnvironment, docname: str) -> None:
    warnings.warn('purge_todos() is deprecated.', RemovedInSphinx40Warning)
    if not hasattr(env, 'todo_all_todos'):
        return
    env.todo_all_todos = [
        todo for todo in env.todo_all_todos  # type: ignore
        if todo['docname'] != docname
    ]