diff --git a/docs/reST/ext/documenters.py b/docs/reST/ext/documenters.py index 81a10f74c2..0775a1f843 100644 --- a/docs/reST/ext/documenters.py +++ b/docs/reST/ext/documenters.py @@ -41,7 +41,9 @@ def build_signatures(object): arg_string = arg_string[2:] if ret.count("[") > 2 or ret.count(",") > 3: - ret = "..." + ret = ret.split("[")[0] + if ret in ("Optional", "Union"): + ret = "..." yield f"| :sg:`{name}({arg_string}) -> {ret}`" diff --git a/src_c/doc/cursors_doc.h b/src_c/doc/cursors_doc.h index 4669674bec..aa12f0c53b 100644 --- a/src_c/doc/cursors_doc.h +++ b/src_c/doc/cursors_doc.h @@ -1,7 +1,7 @@ /* Auto generated file: with make_docs.py . Docs go in docs/reST/ref/ . */ #define DOC_CURSORS "Pygame module for cursor resources." -#define DOC_CURSORS_COMPILE "compile(strings, black='X', white='.', xor='o') -> ...\nCreate binary cursor data from simple strings." -#define DOC_CURSORS_LOADXBM "load_xbm(curs, mask) -> ...\nLoad cursor data from an XBM file." +#define DOC_CURSORS_COMPILE "compile(strings, black='X', white='.', xor='o') -> tuple\nCreate binary cursor data from simple strings." +#define DOC_CURSORS_LOADXBM "load_xbm(curs, mask) -> tuple\nLoad cursor data from an XBM file." #define DOC_CURSORS_CURSOR "Cursor(constant=...) -> Cursor\nCursor(cursor) -> Cursor\nCursor(size, hotspot, xormasks, andmasks) -> Cursor\nCursor(hotspot, surface) -> Cursor\nPygame object representing a cursor." #define DOC_CURSORS_CURSOR_COPY "copy() -> Cursor\nCopy the current cursor." #define DOC_CURSORS_CURSOR_TYPE "type -> Literal['system', 'color', 'bitmap']\nGet the cursor type."