Skip to content

Commit a957f4c

Browse files
committed
Sphinx build fixes for docs.
1 parent cc4666a commit a957f4c

File tree

3 files changed

+32
-22
lines changed

3 files changed

+32
-22
lines changed

README.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@ Introduction
33
============
44

55
.. image:: https://readthedocs.org/projects/adafruit-circuitpython-tsl2591/badge/?version=latest
6-
76
:target: https://circuitpython.readthedocs.io/projects/tsl2591/en/latest/
8-
97
:alt: Documentation Status
108

119
.. image :: https://img.shields.io/discord/327254708534116352.svg
1210
:target: https://discord.gg/nBQh6qu
1311
:alt: Discord
1412
13+
.. image:: https://travis-ci.org/adafruit/Adafruit_CircuitPython_TSL2591.svg?branch=master
14+
:target: https://travis-ci.org/adafruit/Adafruit_CircuitPython_TSL2591
15+
:alt: Build Status
16+
1517
CircuitPython module for the TSL2591 high precision light sensor.
1618

1719
Dependencies

adafruit_tsl2591.py

+26-18
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
# THE SOFTWARE.
2222
"""
23-
`Adafruit_TSL2591`
23+
`adafruit_tsl2591`
2424
====================================================
2525
2626
CircuitPython module for the TSL2591 precision light sensor. See
@@ -58,26 +58,33 @@
5858

5959
# User-facing constants:
6060
GAIN_LOW = 0x00 # low gain (1x)
61+
"""Low gain (1x)"""
6162
GAIN_MED = 0x10 # medium gain (25x)
63+
"""Medium gain (25x)"""
6264
GAIN_HIGH = 0x20 # medium gain (428x)
65+
"""High gain (428x)"""
6366
GAIN_MAX = 0x30 # max gain (9876x)
67+
"""Max gain (9876x)"""
6468
INTEGRATIONTIME_100MS = 0x00 # 100 millis
69+
"""100 millis"""
6570
INTEGRATIONTIME_200MS = 0x01 # 200 millis
71+
"""200 millis"""
6672
INTEGRATIONTIME_300MS = 0x02 # 300 millis
73+
"""300 millis"""
6774
INTEGRATIONTIME_400MS = 0x03 # 400 millis
75+
"""400 millis"""
6876
INTEGRATIONTIME_500MS = 0x04 # 500 millis
77+
"""500 millis"""
6978
INTEGRATIONTIME_600MS = 0x05 # 600 millis
79+
"""600 millis"""
7080
#pylint: enable=bad-whitespace
7181

7282

7383
class TSL2591:
74-
"""Create an instance of the TSL2591 high precision light sensor. Must
75-
specify:
76-
- i2c: The I2C bus connected to the sensor.
77-
78-
Can optionally specify:
79-
- address: The I2C address of the sensor. If not specified the sensor
80-
default will be used.
84+
"""TSL2591 high precision light sensor.
85+
:param busio.I2C i2c: The I2C bus connected to the sensor
86+
:param int address: The I2C address of the sensor. If not specified
87+
the sensor default will be used.
8188
"""
8289

8390
# Class-level buffer to reduce memory usage and allocations.
@@ -141,10 +148,11 @@ def disable(self):
141148
@property
142149
def gain(self):
143150
"""Get and set the gain of the sensor. Can be a value of:
144-
- GAIN_LOW (1x)
145-
- GAIN_MED (25x)
146-
- GAIN_HIGH (428x)
147-
- GAIN_MAX (9876x)
151+
152+
- `GAIN_LOW` (1x)
153+
- `GAIN_MED` (25x)
154+
- `GAIN_HIGH` (428x)
155+
- `GAIN_MAX` (9876x)
148156
"""
149157
control = self._read_u8(_TSL2591_REGISTER_CONTROL)
150158
return control & 0b00110000
@@ -163,12 +171,12 @@ def gain(self, val):
163171
@property
164172
def integration_time(self):
165173
"""Get and set the integration time of the sensor. Can be a value of:
166-
- INTEGRATIONTIME_100MS (100 millis)
167-
- INTEGRATIONTIME_200MS (200 millis)
168-
- INTEGRATIONTIME_300MS (300 millis)
169-
- INTEGRATIONTIME_400MS (400 millis)
170-
- INTEGRATIONTIME_500MS (500 millis)
171-
- INTEGRATIONTIME_600MS (600 millis)
174+
- `INTEGRATIONTIME_100MS` (100 millis)
175+
- `INTEGRATIONTIME_200MS` (200 millis)
176+
- `INTEGRATIONTIME_300MS` (300 millis)
177+
- `INTEGRATIONTIME_400MS` (400 millis)
178+
- `INTEGRATIONTIME_500MS` (500 millis)
179+
- `INTEGRATIONTIME_600MS` (600 millis)
172180
"""
173181
control = self._read_u8(_TSL2591_REGISTER_CONTROL)
174182
return control & 0b00000111

conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Uncomment the below if you use native CircuitPython modules such as
1919
# digitalio, micropython and busio. List the modules you use. Without it, the
2020
# autodoc module docs will fail to generate with a warning.
21-
# autodoc_mock_imports = ["digitalio", "busio"]
21+
autodoc_mock_imports = ["micropython", "adafruit_bus_device"]
2222

2323
intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'BusDevice': ('https://circuitpython.readthedocs.io/projects/bus_device/en/latest/', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}
2424

@@ -93,7 +93,7 @@
9393
# Add any paths that contain custom static files (such as style sheets) here,
9494
# relative to this directory. They are copied after the builtin static files,
9595
# so a file named "default.css" will overwrite the builtin "default.css".
96-
html_static_path = ['_static']
96+
#html_static_path = ['_static']
9797

9898
# Output file base name for HTML help builder.
9999
htmlhelp_basename = 'AdafruitTsl2591Librarydoc'

0 commit comments

Comments
 (0)