Skip to content

Commit 7b914db

Browse files
Daniel GriswoldDaniel Griswold
authored andcommitted
fixed black and pylint errors.
1 parent 7ba09ad commit 7b914db

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

adafruit_lc709203f.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ def cell_voltage(self):
123123
def cell_percent(self):
124124
"""Returns percentage of cell capacity"""
125125
return self._read_word(LC709203F_CMD_CELLITE) / 10
126-
126+
127127
@property
128128
def cell_temperature(self):
129129
"""Returns the temperature of the cell"""
130130
return self._read_word(LC709203F_CMD_CELLTEMPERATURE) / 10 - 273.15
131-
131+
132132
@cell_temperature.setter
133133
def cell_temperature(self, value):
134134
"""Sets the temperature in the LC709203F"""
@@ -173,28 +173,28 @@ def pack_size(self, size):
173173
if not PackSize.is_valid(size):
174174
raise AttributeError("pack_size must be a PackSize")
175175
self._write_word(LC709203F_CMD_APA, size)
176-
176+
177177
@property
178178
def thermistor_bconstant(self):
179179
"""Returns the thermistor B-constant"""
180180
return self._read_word(LC709203F_CMD_THERMISTORB)
181-
181+
182182
@thermistor_bconstant.setter
183-
def thermistor_bconstant(self,bconstant):
183+
def thermistor_bconstant(self, bconstant):
184184
"""Sets the thermistor B-constant"""
185185
self._write_word(LC709203F_CMD_THERMISTORB, bconstant)
186-
186+
187187
@property
188188
def thermistor_enable(self):
189189
"""Returns the current temperature source"""
190190
return self._read_word(LC709203F_CMD_STATUSBIT)
191-
191+
192192
@thermistor_enable.setter
193-
def thermistor_enable(self,status):
193+
def thermistor_enable(self, status):
194194
"""Sets the temperature source to Tsense"""
195195
if not status in (True, False):
196196
raise AttributeError("thermistor_enable must be True or False")
197-
self._write_word(LC709203F_CMD_STATUSBIT,status)
197+
self._write_word(LC709203F_CMD_STATUSBIT, status)
198198

199199
# pylint: disable=no-self-use
200200
def _generate_crc(self, data):

examples/lc709203f_thermistortest.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-FileCopyrightText: 2021 Daniel Griswold
22
#
33
# SPDX-License-Identifier: MIT
4-
4+
55
import time
66
import board
77
from adafruit_lc709203f import LC709203F
@@ -17,7 +17,5 @@
1717

1818
print("IC version:", hex(sensor.ic_version))
1919
while True:
20-
print(
21-
"Cell Temperature: %0.2f C" % (sensor.cell_temperature)
22-
)
20+
print("Cell Temperature: %0.2f C" % (sensor.cell_temperature))
2321
time.sleep(1)

0 commit comments

Comments
 (0)