Skip to content

Commit d9eb5da

Browse files
committed
all linting should be fixed
1 parent 9be3b59 commit d9eb5da

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

adafruit_pcf8591/analog_in.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def value(self):
5454

5555
@property
5656
def reference_voltage(self):
57-
"""The maximum voltage measurable (also known as the reference voltage) as a float in Volts. Assumed to be 3.3V but can be overridden using the `PCF8591` constructor"""
57+
"""The maximum voltage measurable (also known as the reference voltage) as a float in
58+
Volts. Assumed to be 3.3V but can be overridden using the `PCF8591` constructor"""
5859
if not self._pcf:
5960
raise RuntimeError(
6061
"Underlying ADC does not exist, likely due to callint `deinit`"

adafruit_pcf8591/analog_out.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, pcf, dac_pin=0):
3939
4040
"""
4141
self._pcf = pcf
42-
if dac_pin is not 0:
42+
if dac_pin != 0:
4343
raise AttributeError("DAC pin must be adafruit_pcf8591.pcf8591.DAC_PIN")
4444
self._pin_setting = dac_pin
4545
self._pcf.dac_enabled = True
@@ -62,7 +62,8 @@ def value(self, new_value): # this may have to scale from 16-bit
6262
self._pcf.analog_write(new_value >> 8)
6363
self._value = new_value
6464

65-
def deinit():
66-
"""Disable the underlying DAC and release the reference to the PCF8591. Create a new AnalogOut to use it again."""
65+
def deinit(self):
66+
"""Disable the underlying DAC and release the reference to the PCF8591.
67+
Create a new AnalogOut to use it again."""
6768
self._pcf.dac_enabled = False
6869
self._pcf = None

adafruit_pcf8591/pcf8591.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def __init__(self, i2c_bus, address=_PCF8591_DEFAULT_ADDR, reference_voltage=3.3
6969

7070
@property
7171
def reference_voltage(self):
72-
"""The voltage level that ADC signals are compared to. An ADC value of 65535 will equal `reference_voltage`"""
72+
"""The voltage level that ADC signals are compared to.
73+
An ADC value of 65535 will equal `reference_voltage`"""
7374
return self._reference_voltage
7475

7576
def analog_read(self, channel):

0 commit comments

Comments
 (0)