From ad6b85a3d81108e2b3a52283f310797cc455f0fb Mon Sep 17 00:00:00 2001 From: Ben Nuttall Date: Sat, 11 Mar 2017 01:15:24 +0000 Subject: [PATCH] Formatting fixes --- docs/api_tools.rst | 8 +++----- docs/notes.rst | 8 ++++---- docs/recipes_remote_gpio.rst | 2 +- docs/remote_gpio.rst | 6 +++--- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/api_tools.rst b/docs/api_tools.rst index 6f23668..185eb19 100644 --- a/docs/api_tools.rst +++ b/docs/api_tools.rst @@ -5,10 +5,9 @@ Source Tools .. currentmodule:: gpiozero.tools GPIO Zero includes several utility routines which are intended to be used with -the :attr:`~gpiozero.SourceMixin.source` and -:attr:`~gpiozero.ValuesMixin.values` attributes common to most devices in the -library. These utility routines are in the ``tools`` module of GPIO Zero and -are typically imported as follows:: +the :doc:`source_values` attributes common to most devices in the library. These +utility routines are in the ``tools`` module of GPIO Zero and are typically +imported as follows:: from gpiozero.tools import scaled, negated, all_values @@ -76,4 +75,3 @@ Artificial sources .. autofunction:: random_values .. autofunction:: sin_values - diff --git a/docs/notes.rst b/docs/notes.rst index 97a650f..b9547fd 100644 --- a/docs/notes.rst +++ b/docs/notes.rst @@ -78,9 +78,9 @@ version of gpiozero is available in your Python environment like so:: >>> from pkg_resources import require >>> require('gpiozero') - [gpiozero 1.2.0 (/usr/local/lib/python2.7/dist-packages)] + [gpiozero 1.3.2 (/usr/lib/python3/dist-packages)] >>> require('gpiozero')[0].version - '1.2.0' + '1.3.2' If you have multiple versions installed (e.g. from ``pip`` and ``apt``) they will not show up in the list returned by the ``require`` method. However, the @@ -90,9 +90,9 @@ import. If you receive the error "No module named pkg_resources", you need to install the ``pip`` utility. This can be done with the following command in Raspbian:: - $ sudo apt install python-pip + sudo apt install python-pip Alternatively, install pip with `get-pip`_. -.. get_pip: https://pip.pypa.io/en/stable/installing/ +.. _get_pip: https://pip.pypa.io/en/stable/installing/ diff --git a/docs/recipes_remote_gpio.rst b/docs/recipes_remote_gpio.rst index a322682..c0adf77 100644 --- a/docs/recipes_remote_gpio.rst +++ b/docs/recipes_remote_gpio.rst @@ -37,7 +37,7 @@ Multi-room doorbell =================== Install a Raspberry Pi with a buzzer attached in each room you want to hear the -doorbell, and use a push button ad the doorbell:: +doorbell, and use a push button ad the doorbell: .. literalinclude:: examples/multi_room_doorbell.py diff --git a/docs/remote_gpio.rst b/docs/remote_gpio.rst index d74408f..0c308d8 100644 --- a/docs/remote_gpio.rst +++ b/docs/remote_gpio.rst @@ -39,14 +39,14 @@ Then launch the pigpio daemon:: sudo pigpiod To only allow connections from a specific IP address, use the ``-n`` flag. For -example: +example:: sudo pigpiod -n localhost # allow localhost only sudo pigpiod -n 192.168.1.65 # allow 192.168.1.65 only sudo pigpiod -n localhost -n 192.168.1.65 # allow localhost and 192.168.1.65 only You will need to launch the pigpio daemon every time you wish to use this -feature. To automate running the daemon at boot time: +feature. To automate running the daemon at boot time:: ??? @@ -77,7 +77,7 @@ Alternatively, install with pip:: sudo pip3 install pigpio -or: +or:: sudo pip install pigpio