Skip to content

remove bad-whitespace pylint directive #33

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 3 commits into from
Aug 28, 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
8 changes: 4 additions & 4 deletions adafruit_mcp230xx/digital_inout.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def pull(self):
try:
if _get_bit(self._mcp.gppu, self._pin):
return digitalio.Pull.UP
except AttributeError:
except AttributeError as error:
# MCP23016 doesn't have a `gppu` register.
raise ValueError("Pull-up/pull-down resistors not supported.")
raise ValueError("Pull-up/pull-down resistors not supported.") from error
return None

@pull.setter
Expand All @@ -128,6 +128,6 @@ def pull(self, val):
raise ValueError("Pull-down resistors are not supported!")
else:
raise ValueError("Expected UP, DOWN, or None for pull state!")
except AttributeError:
except AttributeError as error:
# MCP23016 doesn't have a `gppu` register.
raise ValueError("Pull-up/pull-down resistors not supported.")
raise ValueError("Pull-up/pull-down resistors not supported.") from error
1 change: 0 additions & 1 deletion adafruit_mcp230xx/mcp23008.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
__version__ = "0.0.0-auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx.git"

# pylint: disable=bad-whitespace
_MCP23008_ADDRESS = const(0x20)
_MCP23008_IODIR = const(0x00)
_MCP23008_IPOL = const(0x01)
Expand Down
1 change: 0 additions & 1 deletion adafruit_mcp230xx/mcp23016.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
__version__ = "0.0.0-auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx.git"

# pylint: disable=bad-whitespace
_MCP23016_ADDRESS = const(0x20)
_MCP23016_GPIO0 = const(0x00)
_MCP23016_GPIO1 = const(0x01)
Expand Down
1 change: 0 additions & 1 deletion adafruit_mcp230xx/mcp23017.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
__version__ = "0.0.0-auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx.git"

# pylint: disable=bad-whitespace
_MCP23017_ADDRESS = const(0x20)
_MCP23017_IODIRA = const(0x00)
_MCP23017_IODIRB = const(0x01)
Expand Down