Skip to content

Commit d535408

Browse files
authored
Fix doc build for Python 3.11+ (#8583)
1 parent 0033ddc commit d535408

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def inject_weight_metadata(app, what, name, obj, options, lines):
383383
f"``weights='DEFAULT'`` or ``weights='{str(list(obj)[0]).split('.')[1]}'``.",
384384
]
385385

386-
if obj.__doc__ != "An enumeration.":
386+
if obj.__doc__ is not None and obj.__doc__ != "An enumeration.":
387387
# We only show the custom enum doc if it was overridden. The default one from Python is "An enumeration"
388388
lines.append("")
389389
lines.append(obj.__doc__)

0 commit comments

Comments
 (0)