Skip to content

Commit a7bb5b2

Browse files
committed
Unified all whitespace commits
1 parent 0c96237 commit a7bb5b2

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

adafruit_circuitplayground/express.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,18 @@ def button_b(self):
484484

485485
@property
486486
def were_pressed(self):
487+
"""Returns a set of the buttons that have been pressed
488+
489+
.. image :: ../docs/_static/button_b.jpg
490+
:alt: Button B
491+
492+
.. code-block:: python
493+
494+
from adafruit_circuitplayground.express import cpx
495+
496+
while True:
497+
print(cpx.were_pressed)
498+
"""
487499
ret = set()
488500
pressed = self.gamepad.get_pressed()
489501
for button, mask in (('A', 0x01), ('B', 0x02)):

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
'NeoPixel': ('https://circuitpython.readthedocs.io/projects/neopixel/en/latest/', None)}
2121

2222
# Libraries we depend on but don't need for generating docs.
23-
autodoc_mock_imports = ["board", "analogio", "digitalio", "neopixel", "adafruit_thermistor", "audioio", "touchio", "adafruit_lis3dh", "busio"]
23+
autodoc_mock_imports = ["board", "analogio", "digitalio", "neopixel", "adafruit_thermistor", "audioio", "touchio", "adafruit_lis3dh", "busio", "gamepad"]
2424

2525
# Add any paths that contain templates here, relative to this directory.
2626
templates_path = ['_templates']

0 commit comments

Comments
 (0)