Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix plantuml top-level import #1328

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions sphinx_needs/directives/needflow/_plantuml.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
from docutils import nodes
from jinja2 import Template
from sphinx.application import Sphinx
from sphinxcontrib.plantuml import (
generate_name, # Need for plantuml filename calculation
)

from sphinx_needs.config import LinkOptionsType, NeedsSphinxConfig
from sphinx_needs.data import NeedsFlowType, NeedsInfoType, SphinxNeedsData
Expand Down Expand Up @@ -244,7 +241,7 @@ def process_needflow_plantuml(
try:
if "sphinxcontrib.plantuml" not in app.config.extensions:
raise ImportError
from sphinxcontrib.plantuml import plantuml
from sphinxcontrib.plantuml import generate_name, plantuml
except ImportError:
error_node = nodes.error()
para = nodes.paragraph()
Expand Down
5 changes: 1 addition & 4 deletions sphinx_needs/directives/needgantt.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
from docutils import nodes
from docutils.parsers.rst import directives
from sphinx.application import Sphinx
from sphinxcontrib.plantuml import (
generate_name, # Need for plantuml filename calculation
)

from sphinx_needs.config import NeedsSphinxConfig
from sphinx_needs.data import NeedsGanttType, SphinxNeedsData
Expand Down Expand Up @@ -176,7 +173,7 @@ def process_needgantt(
try:
if "sphinxcontrib.plantuml" not in app.config.extensions:
raise ImportError
from sphinxcontrib.plantuml import plantuml
from sphinxcontrib.plantuml import generate_name, plantuml
except ImportError:
no_plantuml(node)
continue
Expand Down
5 changes: 1 addition & 4 deletions sphinx_needs/directives/needsequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
from docutils import nodes
from docutils.parsers.rst import directives
from sphinx.application import Sphinx
from sphinxcontrib.plantuml import (
generate_name, # Need for plantuml filename calculation
)

from sphinx_needs.config import NeedsSphinxConfig
from sphinx_needs.data import NeedsInfoType, NeedsSequenceType, SphinxNeedsData
Expand Down Expand Up @@ -124,7 +121,7 @@ def process_needsequence(
try:
if "sphinxcontrib.plantuml" not in app.config.extensions:
raise ImportError
from sphinxcontrib.plantuml import plantuml
from sphinxcontrib.plantuml import generate_name, plantuml
except ImportError:
no_plantuml(node)
continue
Expand Down
Loading