Skip to content

Commit 0c8398f

Browse files
authored
Merge pull request #1 from dhalbert/black-fixes
fix black and pylint failures
2 parents 3ec73d2 + 3a67ee7 commit 0c8398f

File tree

4 files changed

+14
-31
lines changed

4 files changed

+14
-31
lines changed

README.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ Installing from PyPI
3535
.. note:: This library is not available on PyPI yet. Install documentation is included
3636
as a standard element. Stay tuned for PyPI availability!
3737

38-
.. todo:: Remove the above note if PyPI version is/will be available at time of release.
39-
If the library is not planned for PyPI, remove the entire 'Installing from PyPI' section.
40-
4138
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
4239
PyPI <https://pypi.org/project/adafruit-circuitpython-ble-berrymed_pulse_oximeter/>`_. To install for current user:
4340

@@ -60,11 +57,6 @@ To install in a virtual environment in your current project:
6057
source .env/bin/activate
6158
pip3 install adafruit-circuitpython-ble-berrymed-pulse-oximeter
6259
63-
Usage Example
64-
=============
65-
66-
.. todo:: Add a quick, simple example. It and other examples should live in the examples folder and be included in docs/examples.rst.
67-
6860
Contributing
6961
============
7062

adafruit_ble_berrymed_pulse_oximeter/__init__.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
3838
Protocol defined here: https://github.com/zh2x/BCI_Protocol
3939
Thanks as well to:
40-
https://github.com/ehborisov/BerryMed-Pulse-Oximeter-tool
41-
https://github.com/ScheindorfHyenetics/berrymedBluetoothOxymeter
40+
* https://github.com/ehborisov/BerryMed-Pulse-Oximeter-tool
41+
* https://github.com/ScheindorfHyenetics/berrymedBluetoothOxymeter
4242
4343
**Software and Dependencies:**
4444
@@ -60,28 +60,27 @@
6060

6161

6262
PulseOximeterValues = namedtuple(
63-
"PulseOximeterValues",
64-
("valid", "spo2", "pulse_rate", "pleth", "finger_present"),
63+
"PulseOximeterValues", ("valid", "spo2", "pulse_rate", "pleth", "finger_present"),
6564
)
6665
"""Namedtuple for measurement values.
6766
68-
.. py:attribute:: PulseOximeterValues.valid
67+
* `PulseOximeterValues.valid`
6968
70-
``True` if sensor readings are not valid right now
69+
``True`` if sensor readings are not valid right now
7170
72-
.. py:attribute:: PulseOximeterValues.finger_present
71+
* `PulseOximeterValues.finger_present`
7372
7473
``True`` if finger present.
7574
76-
.. py:attribute:: PulseOximeterValues.spo2
75+
* `PulseOximeterValues.spo2`
7776
7877
SpO2 value (int): 0-100%: blood oxygen saturation level.
7978
80-
.. py:attribute:: PulseOximeterValues.pulse_rate
79+
* `PulseOximeterValues.pulse_rate`
8180
8281
Pulse rate, in beats per minute (int).
8382
84-
.. py:attribute:: PulseOximeterValues.pleth
83+
* `PulseOximeterValues.pleth`
8584
8685
Plethysmograph value, 0-100 (int).
8786

docs/index.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,9 @@ Table of Contents
2323
.. toctree::
2424
:caption: Tutorials
2525

26-
.. todo:: Add any Learn guide links here. If there are none, then simply delete this todo and leave
27-
the toctree above for use later.
28-
2926
.. toctree::
3027
:caption: Related Products
3128

32-
.. todo:: Add any product links here. If there are none, then simply delete this todo and leave
33-
the toctree above for use later.
34-
3529
.. toctree::
3630
:caption: Other Links
3731

examples/ble_berrymed_pulse_oximeter_simpletest.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@
1010
#
1111
# The sensor updates the readings at 100Hz.
1212

13-
import time
14-
1513
import _bleio
1614
import adafruit_ble
17-
from adafruit_ble.advertising.standard import Advertisement,ProvideServicesAdvertisement
15+
from adafruit_ble.advertising.standard import Advertisement
1816
from adafruit_ble.services.standard.device_info import DeviceInfoService
1917
from adafruit_ble_berrymed_pulse_oximeter import BerryMedPulseOximeterService
2018

2119
# PyLint can't find BLERadio for some reason so special case it here.
22-
ble = adafruit_ble.BLERadio() # pylint: disable=no-member
20+
ble = adafruit_ble.BLERadio() # pylint: disable=no-member
2321

2422
pulse_ox_connection = None
2523

@@ -30,7 +28,7 @@
3028
if not name:
3129
continue
3230
# "BerryMed" devices may have trailing nulls on their name.
33-
if name.strip('\x00') == "BerryMed":
31+
if name.strip("\x00") == "BerryMed":
3432
pulse_ox_connection = ble.connect(adv)
3533
print("Connected")
3634
break
@@ -58,9 +56,9 @@
5856
pulse_ox_service = pulse_ox_connection[BerryMedPulseOximeterService]
5957
while pulse_ox_connection.connected:
6058
print(pulse_ox_service.values)
61-
except _bleio.ConnectionError:
59+
except _bleio.ConnectionError: # pylint: disable=no-member
6260
try:
6361
pulse_ox_connection.disconnect()
64-
except:
62+
except _bleio.ConnectionError: # pylint: disable=no-member
6563
pass
6664
pulse_ox_connection = None

0 commit comments

Comments
 (0)