Skip to content

Commit

Permalink
Change displayed return type
Browse files Browse the repository at this point in the history
  • Loading branch information
zoldalma999 committed Dec 3, 2024
1 parent 209acd6 commit 2c36fc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/reST/ext/documenters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}`"

Expand Down
4 changes: 2 additions & 2 deletions src_c/doc/cursors_doc.h
Original file line number Diff line number Diff line change
@@ -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."
Expand Down

0 comments on commit 2c36fc9

Please sign in to comment.