Skip to content

Commit 2c36fc9

Browse files
committed
Change displayed return type
1 parent 209acd6 commit 2c36fc9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/reST/ext/documenters.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def build_signatures(object):
4141
arg_string = arg_string[2:]
4242

4343
if ret.count("[") > 2 or ret.count(",") > 3:
44-
ret = "..."
44+
ret = ret.split("[")[0]
45+
if ret in ("Optional", "Union"):
46+
ret = "..."
4547

4648
yield f"| :sg:`{name}({arg_string}) -> {ret}`"
4749

src_c/doc/cursors_doc.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Auto generated file: with make_docs.py . Docs go in docs/reST/ref/ . */
22
#define DOC_CURSORS "Pygame module for cursor resources."
3-
#define DOC_CURSORS_COMPILE "compile(strings, black='X', white='.', xor='o') -> ...\nCreate binary cursor data from simple strings."
4-
#define DOC_CURSORS_LOADXBM "load_xbm(curs, mask) -> ...\nLoad cursor data from an XBM file."
3+
#define DOC_CURSORS_COMPILE "compile(strings, black='X', white='.', xor='o') -> tuple\nCreate binary cursor data from simple strings."
4+
#define DOC_CURSORS_LOADXBM "load_xbm(curs, mask) -> tuple\nLoad cursor data from an XBM file."
55
#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."
66
#define DOC_CURSORS_CURSOR_COPY "copy() -> Cursor\nCopy the current cursor."
77
#define DOC_CURSORS_CURSOR_TYPE "type -> Literal['system', 'color', 'bitmap']\nGet the cursor type."

0 commit comments

Comments
 (0)