Skip to content

Commit

Permalink
Try and fix online API docs generation
Browse files Browse the repository at this point in the history
  • Loading branch information
MyreMylar committed Mar 11, 2023
1 parent 92dbd16 commit cea79f2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#
import os
import sys
import sphinxcontrib.htmlhelp
import sphinxcontrib.applehelp
import sphinx_rtd_theme


Expand Down Expand Up @@ -112,8 +114,6 @@
# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
'pygame-ce': ('https://pyga.me/docs/', None),
'pygame': ('https://pyga.me/docs/', None)}
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}

autodoc_mock_imports = ["ctypes"]
4 changes: 2 additions & 2 deletions docs/source/theme_reference/theme_text_entry_box.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _theme-text-box:
.. _theme-text-entry-box:

UITextEntryBox Theming Parameters
===============================
=================================

.. raw:: html

Expand Down
24 changes: 14 additions & 10 deletions pygame_gui/core/colour_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,11 +699,13 @@ def split_string_at_indices(strdata: str, indices: Union[List[int], Set[int], Tu


def is_valid_gradient_string(strdata: str) -> bool:
"""Validate a gradient string
A gradient string should consist of a 3 or 4 length comma separated list, with the first values being any valid colour strings and the last value representing a degree angle for the direction of the gradient
Examples:
- "red,blue,40deg"
- "#f23,rgb(30, 70, 230),hsv(50, 70%, 90%),50"
"""
Validate a gradient string
A gradient string should consist of a 3 or 4 length comma separated list, with the first values being any valid
colour strings and the last value representing a degree angle for the direction of the gradient.
Examples:
- "red,blue,40deg"
- "#f23,rgb(30, 70, 230),hsv(50, 70%, 90%),50"
:param strdata: the gradient string to validate
:type strdata: str
Expand All @@ -721,11 +723,13 @@ def is_valid_gradient_string(strdata: str) -> bool:


def parse_gradient_string(strdata: str) -> Optional[ColourGradient]:
"""Parse a gradient string
A gradient string should consist of a 3 or 4 length comma separated list, with the first values being any valid colour strings and the last value representing a degree angle for the direction of the gradient
Examples:
- "red,blue,40deg"
- "#f23,rgb(30, 70, 230),hsv(50, 70%, 90%),50"
"""
Parse a gradient string
A gradient string should consist of a 3 or 4 length comma separated list, with the first values being any valid
colour strings and the last value representing a degree angle for the direction of the gradient
Examples:
- "red,blue,40deg"
- "#f23,rgb(30, 70, 230),hsv(50, 70%, 90%),50"
:param strdata: the gradient string to validate
:type strdata: str
Expand Down

0 comments on commit cea79f2

Please sign in to comment.