File tree 4 files changed +4
-7
lines changed 4 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -112,9 +112,9 @@ def pull(self):
112
112
try :
113
113
if _get_bit (self ._mcp .gppu , self ._pin ):
114
114
return digitalio .Pull .UP
115
- except AttributeError :
115
+ except AttributeError as error :
116
116
# MCP23016 doesn't have a `gppu` register.
117
- raise ValueError ("Pull-up/pull-down resistors not supported." )
117
+ raise ValueError ("Pull-up/pull-down resistors not supported." ) from error
118
118
return None
119
119
120
120
@pull .setter
@@ -128,6 +128,6 @@ def pull(self, val):
128
128
raise ValueError ("Pull-down resistors are not supported!" )
129
129
else :
130
130
raise ValueError ("Expected UP, DOWN, or None for pull state!" )
131
- except AttributeError :
131
+ except AttributeError as error :
132
132
# MCP23016 doesn't have a `gppu` register.
133
- raise ValueError ("Pull-up/pull-down resistors not supported." )
133
+ raise ValueError ("Pull-up/pull-down resistors not supported." ) from error
Original file line number Diff line number Diff line change 19
19
__version__ = "0.0.0-auto.0"
20
20
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx.git"
21
21
22
- # pylint: disable=bad-whitespace
23
22
_MCP23008_ADDRESS = const (0x20 )
24
23
_MCP23008_IODIR = const (0x00 )
25
24
_MCP23008_IPOL = const (0x01 )
Original file line number Diff line number Diff line change 27
27
__version__ = "0.0.0-auto.0"
28
28
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx.git"
29
29
30
- # pylint: disable=bad-whitespace
31
30
_MCP23016_ADDRESS = const (0x20 )
32
31
_MCP23016_GPIO0 = const (0x00 )
33
32
_MCP23016_GPIO1 = const (0x01 )
Original file line number Diff line number Diff line change 19
19
__version__ = "0.0.0-auto.0"
20
20
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx.git"
21
21
22
- # pylint: disable=bad-whitespace
23
22
_MCP23017_ADDRESS = const (0x20 )
24
23
_MCP23017_IODIRA = const (0x00 )
25
24
_MCP23017_IODIRB = const (0x01 )
You can’t perform that action at this time.
0 commit comments