Skip to content

Commit

Permalink
Bugfix for Sphinx extension loader
Browse files Browse the repository at this point in the history
Analyses the module instead of the extension object
to detect an esbonio_setup() function.

Fixes #381
  • Loading branch information
danwos authored and alcarney committed May 9, 2022
1 parent 7f38438 commit 6d2143e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/esbonio/esbonio/lsp/sphinx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ def _load_sphinx_extensions(self, app: Sphinx):
if name in self._loaded_modules:
self.logger.debug("Skipping previously loaded module '%s'", name)

if not hasattr(ext, "esbonio_setup"):
if not hasattr(mod, "esbonio_setup"):
continue

self.logger.debug("Loading sphinx module '%s'", name)
Expand Down

0 comments on commit 6d2143e

Please sign in to comment.