We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a691635 commit 6977a1aCopy full SHA for 6977a1a
adafruit_mcp230xx/mcp23008.py
@@ -85,5 +85,6 @@ def get_pin(self, pin):
85
"""Convenience function to create an instance of the DigitalInOut class
86
pointing at the specified pin of this MCP23008 device.
87
"""
88
- assert 0 <= pin <= 7
+ if not 0 <= pin <= 7:
89
+ raise ValueError("Pin number must be 0-7.")
90
return DigitalInOut(pin, self)
0 commit comments