Skip to content

Commit 3359c5d

Browse files
committed
maybe fix
1 parent 5aa7172 commit 3359c5d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/scanpydoc/definition_list_typed_field.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,10 @@ def handle_item(
9898
@_setup_sig
9999
def setup(app: Sphinx) -> dict[str, Any]:
100100
"""Replace :class:`~sphinx.domains.python.PyTypedField` with ours."""
101-
napoleon_requested = "sphinx.ext.napoleon" in app.config.extensions
102-
napoleon_loaded = next(
103-
(True for ft in PyObject.doc_field_types if ft.name == "keyword"),
104-
False,
105-
)
106-
if napoleon_requested and not napoleon_loaded:
101+
if (
102+
"sphinx.ext.napoleon" in app.config.extensions
103+
and "sphinx.ext.napoleon" not in app.extensions
104+
):
107105
msg = f"Please load sphinx.ext.napoleon before {__name__}"
108106
raise RuntimeError(msg)
109107

0 commit comments

Comments
 (0)