sphinx-needs icon indicating copy to clipboard operation
sphinx-needs copied to clipboard

flatten an unnecessary exception

Open danieleades opened this issue 2 years ago • 1 comments

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?

danieleades avatar Jun 07 '22 20:06 danieleades

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.

danwos avatar Aug 04 '23 07:08 danwos

Already solved or the situation has changed.

danwos avatar May 02 '24 13:05 danwos