Fix PEP8 compliance

This commit is contained in:
Craig Richardson 2018-05-15 15:04:28 +01:00
parent 206898a811
commit f1d408d6b9
2 changed files with 7 additions and 3 deletions

View file

@ -10,7 +10,8 @@ thermistor = adafruit_thermistor.Thermistor(
board.TEMPERATURE, 10000, 10000, 25, 3950)
while True:
print("Temperature is: %f C and %f F" % (thermistor.temperature,
(thermistor.temperature * 9 / 5 + 32)))
temp_c = thermistor.temperature
temp_f = thermistor.temperature * 9 / 5 + 32
print("Temperature is: %f C and %f F" % (temp_c, temp_f))
time.sleep(0.25)

View file

@ -67,7 +67,10 @@ class MorseFlasher:
def __init__(self, color=(255, 255, 255)):
# set the color adjusted for brightness
self._color = (
int(color[0] * brightness), int(color[1] * brightness), int(color[2] * brightness))
int(color[0] * brightness),
int(color[1] * brightness),
int(color[2] * brightness)
)
def light(self, on=True):
if on: