fix various bugs found by the 'prospector' static-analysis tool

This commit is contained in:
Andrew Scheller
2016-04-07 16:12:17 +01:00
parent 4f7e1f003e
commit 72ca075668
13 changed files with 33 additions and 34 deletions

View File

@@ -15,7 +15,7 @@ try:
except ImportError:
from ..compat import isclose
from . import Pin, PINS_CLEANUP
from . import Pin
from ..exc import PinSetInput, PinPWMUnsupported, PinFixedPull
@@ -38,7 +38,7 @@ class MockPin(Pin):
try:
old_pin = cls._PINS[number]
except KeyError:
self = super(Pin, cls).__new__(cls)
self = super(MockPin, cls).__new__(cls)
cls._PINS[number] = self
self._number = number
self._function = 'input'