sphinx-needs
sphinx-needs copied to clipboard
flatten an unnecessary exception
this exception is immediately caught and handled, so might as well be a simple if statement.
@danwos i'm not sure this is reachable anyway, since sphinxcontrib.plantuml
is already imported right at the top of the file. If the extension wasn't available in the build environment, you'd have already thrown an ImportError
by this point.
This exception can only fire if you have installed the extension, but haven't included it in your config.
What are the intended semantics?
You are right, as PlantUML gets already imported, the later check makes no sense.
But as PlantUML is currently no dependency of Sphinx-Needs, we also need to secure this import or make it a dependency.
And sorry for my late response. Totally missed this.
Already solved or the situation has changed.