Skip to content

Black reformatting with Python 3 target. #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions adafruit_ble_cycling_speed_and_cadence.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@
)
"""Namedtuple for measurement values.

.. py:attribute:: CSCMeasurementValues.cumulative_wheel_revolutions
.. :attribute:: cumulative_wheel_revolutions:

Cumulative wheel revolutions (int).

.. py:attribute:: CSCMeasurementValues.last_wheel_event_time
.. :attribute:: last_wheel_event_time:

Time (int), units in 1024ths of a second, when last wheel event was measured.
This is a monotonically increasing clock value, not an interval.

.. py:attribute:: CSCMeasurementValues.cumulative_wheel_revolutions
.. :attribute:: cumulative_crank_revolutions:

Cumulative crank revolutions (int).

.. py:attribute:: CSCMeasurementValues.last_wheel_event_time
.. :attribute:: last_crank_event_time:

Time (int), units in 1024ths of a second, when last crank event was measured.
This is a monotonically increasing clock value, not an interval.
Expand Down Expand Up @@ -145,7 +145,9 @@ class CyclingSpeedAndCadenceService(Service):

def __init__(self, service=None):
super().__init__(service=service)
self._measurement_buf = bytearray(self.csc_measurement.packet_size) #pylint: disable=no-member
self._measurement_buf = bytearray(
self.csc_measurement.packet_size # pylint: disable=no-member
)

@property
def measurement_values(self):
Expand All @@ -168,7 +170,7 @@ def measurement_values(self):
#

buf = self._measurement_buf
packet_length = self.csc_measurement.readinto(buf) #pylint: disable=no-member
packet_length = self.csc_measurement.readinto(buf) # pylint: disable=no-member
if packet_length == 0:
return None
flags = buf[0]
Expand Down
16 changes: 8 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@
master_doc = "index"

# General information about the project.
project = u"Adafruit BLE_Cycling_Speed_and_Cadence Library"
copyright = u"2020 Adafruit Industries"
author = u"Adafruit Industries"
project = "Adafruit BLE_Cycling_Speed_and_Cadence Library"
copyright = "2020 Adafruit Industries"
author = "Adafruit Industries"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u"1.0"
version = "1.0"
# The full version, including alpha/beta/rc tags.
release = u"1.0"
release = "1.0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -140,7 +140,7 @@
(
master_doc,
"AdafruitBLE_Cycling_Speed_And_CadenceLibrary.tex",
u"AdafruitBLE_Cycling_Speed_And_Cadence Library Documentation",
"AdafruitBLE_Cycling_Speed_And_Cadence Library Documentation",
author,
"manual",
),
Expand All @@ -154,7 +154,7 @@
(
master_doc,
"AdafruitBLE_Cycling_Speed_And_Cadencelibrary",
u"Adafruit BLE_Cycling_Speed_And_Cadence Library Documentation",
"Adafruit BLE_Cycling_Speed_And_Cadence Library Documentation",
[author],
1,
)
Expand All @@ -169,7 +169,7 @@
(
master_doc,
"AdafruitBLE_Cycling_Speed_And_CadenceLibrary",
u"Adafruit BLE_Cycling_Speed_And_Cadence Library Documentation",
"Adafruit BLE_Cycling_Speed_And_Cadence Library Documentation",
author,
"AdafruitBLE_Cycling_Speed_And_CadenceLibrary",
"One line description of project.",
Expand Down