Skip to content

Commit a48d801

Browse files
authored
docs: fix deprecated capwords import for Python 3.11+ compatibility (#2605)
1 parent fc5cc28 commit a48d801

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/scripts/generate_ref_files.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"""
1010

1111
from pathlib import Path
12-
from string import capwords
1312

1413
# ---- Paths -----------------------------------------------------------
1514

@@ -38,7 +37,7 @@ def pretty_title(last_segment: str) -> str:
3837
Handles underscores and hyphens; leaves camelCase as‑is except first‑letter cap.
3938
"""
4039
cleaned = last_segment.replace("_", " ").replace("-", " ")
41-
return capwords(cleaned)
40+
return cleaned.title()
4241

4342

4443
# ---- Main ------------------------------------------------------------

0 commit comments

Comments
 (0)