Skip to content

Commit

Permalink
Fix docs issues
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbrittain committed Apr 5, 2021
1 parent 796e08b commit e2eabc2
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 26 deletions.
12 changes: 4 additions & 8 deletions asciimatics/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ class Renderer(with_metaclass(ABCMeta, object)):
@abstractproperty
def max_width(self):
"""
:return: The max width of the rendered text (across all images if an
animated renderer).
:return: The max width of the rendered text (across all images if an animated renderer).
"""

@abstractproperty
Expand All @@ -68,8 +67,7 @@ def images(self):
@abstractproperty
def max_height(self):
"""
:return: The max height of the rendered text (across all images if an
animated renderer).
:return: The max height of the rendered text (across all images if an animated renderer).
"""

def __repr__(self):
Expand Down Expand Up @@ -179,8 +177,7 @@ def rendered_text(self):
@property
def max_height(self):
"""
:return: The max height of the rendered text (across all images if an
animated renderer).
:return: The max height of the rendered text (across all images if an animated renderer).
"""
if len(self._plain_images) <= 0:
self._convert_images()
Expand All @@ -193,8 +190,7 @@ def max_height(self):
@property
def max_width(self):
"""
:return: The max width of the rendered text (across all images if an
animated renderer).
:return: The max width of the rendered text (across all images if an animated renderer).
"""
if len(self._plain_images) <= 0:
self._convert_images()
Expand Down
3 changes: 3 additions & 0 deletions asciimatics/widgets/baselistbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ def start_line(self, new_value):

@property
def value(self):
"""
The current value for this list box.
"""
return self._value

@value.setter
Expand Down
3 changes: 3 additions & 0 deletions asciimatics/widgets/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ def text(self, new_text):

@property
def value(self):
"""
The current value for this Button.
"""
return self._value

@value.setter
Expand Down
3 changes: 3 additions & 0 deletions asciimatics/widgets/checkbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def required_height(self, offset, width):

@property
def value(self):
"""
The current value for this Checkbox.
"""
return self._value

@value.setter
Expand Down
3 changes: 3 additions & 0 deletions asciimatics/widgets/datepicker.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ def required_height(self, offset, width):

@property
def value(self):
"""
The current selected date.
"""
return self._value

@value.setter
Expand Down
3 changes: 3 additions & 0 deletions asciimatics/widgets/divider.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,7 @@ def required_height(self, offset, width):

@property
def value(self):
"""
The current value for this Divider.
"""
return self._value
3 changes: 3 additions & 0 deletions asciimatics/widgets/dropdownlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ def required_height(self, offset, width):

@property
def value(self):
"""
The current value for this DropdownList.
"""
return self._value

@value.setter
Expand Down
3 changes: 3 additions & 0 deletions asciimatics/widgets/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,7 @@ def text(self, new_value):

@property
def value(self):
"""
The current value for this Label.
"""
return self._value
3 changes: 3 additions & 0 deletions asciimatics/widgets/radiobuttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ def required_height(self, offset, width):

@property
def value(self):
"""
The current value for these RadioButtons.
"""
# The value is actually the value of the current selection.
return self._options[self._selection][1]

Expand Down
3 changes: 3 additions & 0 deletions asciimatics/widgets/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ def readonly(self, new_value):

@property
def value(self):
"""
The current value for this Text.
"""
return self._value

@value.setter
Expand Down
3 changes: 3 additions & 0 deletions asciimatics/widgets/textbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ def _reflowed_text(self):

@property
def value(self):
"""
The current value for this TextBox.
"""
if self._value is None:
self._value = [""]
return "\n".join([str(x) for x in self._value]) if self._as_string else self._value
Expand Down
3 changes: 3 additions & 0 deletions asciimatics/widgets/timepicker.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ def required_height(self, offset, width):

@property
def value(self):
"""
The current selected time.
"""
return self._value

@value.setter
Expand Down
3 changes: 3 additions & 0 deletions asciimatics/widgets/verticaldivider.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ def required_height(self, offset, width):

@property
def value(self):
"""
The current value for this VerticalDivider.
"""
return self._value
2 changes: 1 addition & 1 deletion doc/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PYTHONPATH=.. sphinx-apidoc ../asciimatics -o ./source -f
cat source/asciimatics.rst | awk -- '/:undoc-members:/ {next} { print $0 } /:members:/ { print " :inherited-members:"}' > source/tmp.rst
cat source/asciimatics.rst | awk -- '/:undoc-members:/ {next} { print $0 } /:members:/ { print " :inherited-members:"}' > source/tmp.rst
mv -f source/tmp.rst source/asciimatics.rst
PYTHONPATH=.. sphinx-build -b html ./source ./build
30 changes: 15 additions & 15 deletions doc/source/asciimatics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,117 +17,117 @@ asciimatics.constants module

.. automodule:: asciimatics.constants
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

asciimatics.effects module
--------------------------

.. automodule:: asciimatics.effects
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

asciimatics.event module
------------------------

.. automodule:: asciimatics.event
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

asciimatics.exceptions module
-----------------------------

.. automodule:: asciimatics.exceptions
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

asciimatics.parsers module
--------------------------

.. automodule:: asciimatics.parsers
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

asciimatics.particles module
----------------------------

.. automodule:: asciimatics.particles
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

asciimatics.paths module
------------------------

.. automodule:: asciimatics.paths
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

asciimatics.renderers module
----------------------------

.. automodule:: asciimatics.renderers
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

asciimatics.scene module
------------------------

.. automodule:: asciimatics.scene
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

asciimatics.screen module
-------------------------

.. automodule:: asciimatics.screen
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

asciimatics.sprites module
--------------------------

.. automodule:: asciimatics.sprites
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

asciimatics.strings module
--------------------------

.. automodule:: asciimatics.strings
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

asciimatics.utilities module
----------------------------

.. automodule:: asciimatics.utilities
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

asciimatics.version module
--------------------------

.. automodule:: asciimatics.version
:members:
:inherited-members:
:inherited-members:
:show-inheritance:

Module contents
---------------

.. automodule:: asciimatics
:members:
:inherited-members:
:inherited-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions doc/source/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ When picking colours you may find that your selection doesn't have the desired e
because terminals have a nasty habit of using different definitions of the standard colours.

Asciimatics relies on the ANSI colour set for its standard settings. As you can see
`here <https://en.wikipedia.org/wiki/ANSI_escape_code#Colors>`_ each terminal has its own
`here <https://en.wikipedia.org/wiki/ANSI_escape_code#Colors>`__ each terminal has its own
interpretation of the exact colour. However, you can usually tweak that in your terminal
settings. For example, iTerm on Mac uses a dark grey for black, which you can change as
shown below.
Expand All @@ -95,7 +95,7 @@ startup using the terminal's control sequences. These will not be invoked by as
on a resize event. If you use such an application, you will need to invoke the control
sequences yourself.

For example, to re-apply a `pywal <https://github.com/dylanaraps/pywal>`_ color theme:
For example, to re-apply a `pywal <https://github.com/dylanaraps/pywal>`__ color theme:

.. code-block:: python
Expand Down

0 comments on commit e2eabc2

Please sign in to comment.