mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix AttributeError in sphinx.builders.latex
Because sphinx.builders.latex.nodes and docutils.nodes are conflicted.
This commit is contained in:
parent
24ce4e72e6
commit
94957ebaa5
@ -11,7 +11,6 @@
|
|||||||
import os
|
import os
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
from docutils import nodes
|
|
||||||
from docutils.frontend import OptionParser
|
from docutils.frontend import OptionParser
|
||||||
|
|
||||||
import sphinx.builders.latex.nodes # NOQA # Workaround: import this before writer to avoid ImportError
|
import sphinx.builders.latex.nodes # NOQA # Workaround: import this before writer to avoid ImportError
|
||||||
@ -41,6 +40,9 @@ from sphinx.writers.latex import (
|
|||||||
ADDITIONAL_SETTINGS, DEFAULT_SETTINGS, LaTeXWriter, LaTeXTranslator
|
ADDITIONAL_SETTINGS, DEFAULT_SETTINGS, LaTeXWriter, LaTeXTranslator
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# load docutils.nodes after loading sphinx.builders.latex.nodes
|
||||||
|
from docutils import nodes # NOQA
|
||||||
|
|
||||||
if False:
|
if False:
|
||||||
# For type annotation
|
# For type annotation
|
||||||
from typing import Any, Dict, Iterable, List, Tuple, Union # NOQA
|
from typing import Any, Dict, Iterable, List, Tuple, Union # NOQA
|
||||||
|
Loading…
Reference in New Issue
Block a user