From 8059392207a7b4932163fb7e62513564b6567caf Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 12 Aug 2024 11:09:19 +0100 Subject: [PATCH] Fix doc build for Python 3.11+ --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 88bf0b28643..df6cca3856a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -383,7 +383,7 @@ def inject_weight_metadata(app, what, name, obj, options, lines): f"``weights='DEFAULT'`` or ``weights='{str(list(obj)[0]).split('.')[1]}'``.", ] - if obj.__doc__ != "An enumeration.": + if obj.__doc__ is not None and obj.__doc__ != "An enumeration.": # We only show the custom enum doc if it was overridden. The default one from Python is "An enumeration" lines.append("") lines.append(obj.__doc__)