Docs: fix various minor sphinx parsing issues

This commit is contained in:
neofelis2X
2025-02-01 15:21:06 +01:00
parent c6311b6332
commit 6f2ca2b5e5
6 changed files with 84 additions and 77 deletions

View File

@@ -71,7 +71,7 @@ wxWidgets implementation of the :class:`ThumbnailCtrl` control. Andrea Gavana
notes that :class:`ThumbnailCtrl` wouldn't have been so fast and complete
without the suggestions and hints from Peter Damoc.
Usage:
Usage
=====
Usage example::

View File

@@ -117,7 +117,7 @@ mask
X Allow string.letters, string.punctuation, string.digits
& Allow string.punctuation only (doesn't include all unicode symbols)
\* Allow any visible character
| explicit field boundary (takes no space in the control; allows mix
\| Explicit field boundary (takes no space in the control; allows mix
of adjacent mask characters to be treated as separate fields,
eg: '&|###' means "field 0 = '&', field 1 = '###'", but there's
no fixed characters in between.
@@ -189,8 +189,9 @@ defaultEncoding
formatcodes
These other properties can be passed to the class when instantiating it:
Formatcodes are specified as a string of single character formatting
codes that modify behavior of the control::
codes that modify behavior of the control:
======= ==========================================================
_ Allow spaces
! Force upper
^ Force lower
@@ -205,15 +206,17 @@ formatcodes
behave more like standard text controls.
(See EMAIL or phone number autoformat examples.)
*Note: This also governs whether backspace/delete operations
shift contents of field to right of cursor, or just blank the
erased section.
.. note::
This also governs whether backspace/delete operations
shift contents of field to right of cursor, or just blank
the erased section.
Also, when combined with 'r', this indicates that the field
or control allows right insert anywhere within the current
non-empty value in the field. (Otherwise right-insert behavior
is only performed to when the entire right-insertable field is
selected or the cursor is at the right edge of the field.*
selected or the cursor is at the right edge of the field.
, Allow grouping character in integer fields of numeric controls
@@ -223,25 +226,30 @@ formatcodes
',' is also the default grouping character. To change the
grouping character and/or decimal character, use the groupChar
and decimalChar parameters, respectively.
Note: typing the "decimal point" character in such fields will
.. note::
Typing the "decimal point" character in such fields will
clip the value to that left of the cursor for integer
fields of controls with "integer" or "floating point" masks.
If the ',' format code is specified, this will also cause the
resulting digits to be regrouped properly, using the current
grouping character.
- Prepend and reserve leading space for sign to mask and allow
\- Prepend and reserve leading space for sign to mask and allow
signed values (negative #s shown in red by default.) Can be
used with argument useParensForNegatives (see below.)
0 integer fields get leading zeros
0 Integer fields get leading zeros
D Date[/time] field
T Time field
F Auto-Fit: the control calculates its size from
the length of the template mask
V validate entered chars against validRegex before allowing them
V Validate entered chars against validRegex before allowing them
to be entered vs. being allowed by basic mask and then having
the resulting value just colored as invalid.
(See USSTATE autoformat demo for how this can be used.)
S select entire field when navigating to new field
S Select entire field when navigating to new field
======= ==========================================================
fillChar

View File

@@ -89,7 +89,7 @@ masked.NumCtrl:
emptyBackgroundColour = "White",
validBackgroundColour = "White",
invalidBackgroundColour = "Yellow",
autoSize = True
autoSize = True,
)

View File

@@ -7,8 +7,12 @@
demo.py
=======
.. highlight:: shell
This is a demo showing some of the capabilities of the :mod:`wx.lib.plot`
package. It is intended to be run as a standalone script via::
package.
It is intended to be run as a standalone script via::
user@host:.../site-packages/wx/lib/plot$ python examples/demo.py

View File

@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
"""
.. highlight:: shell
A simple example showing how to use lib.plot from wxPython.
It is intended to be run as a standalone script via::

View File

@@ -120,7 +120,7 @@ class PolyPoints(object):
:type: tuple of bool, length 2
:raises ValueError: when setting an invalid value
.. notes::
.. note::
This is a simplified example of how SymLog works::
@@ -163,7 +163,7 @@ class PolyPoints(object):
:type: tuple of float, length 2
:raises ValueError: when setting an invalid value
.. notes::
.. note::
This is a simplified example of how SymLog works::
@@ -221,7 +221,7 @@ class PolyPoints(object):
:setter: Sets the value of points.
:type: list of `(x, y)` pairs
.. Note::
.. note::
Only set unscaled points - do not perform the log, abs, or symlog
adjustments yourself.
@@ -1010,17 +1010,10 @@ class PolyBoxPlot(PolyPoints):
outliers are outside of 1.5 * IQR
Parameters
----------
data : array-like
The data to plot
Returns
-------
bpdata : collections.namedtuple
Descriptive statistics for data:
:param array-like data: The data to plot
:return bpdata: Descriptive statistics for data:
(min_data, low_whisker, q25, median, q75, high_whisker, max_data)
:rtype: collections.namedtuple
"""
data = self._clean_data(data)
@@ -1066,8 +1059,8 @@ class PolyBoxPlot(PolyPoints):
"""
Draws a box plot on the DC.
Notes
-----
.. note::
The following draw order is required:
1. First the whisker line