diff --git a/homeassistant/components/bbb_gpio.py b/homeassistant/components/bbb_gpio.py index e85c027882fd04..52ab14689fd3ec 100644 --- a/homeassistant/components/bbb_gpio.py +++ b/homeassistant/components/bbb_gpio.py @@ -19,6 +19,7 @@ # pylint: disable=no-member def setup(hass, config): """Setup the Beaglebone black GPIO component.""" + # pylint: disable=import-error import Adafruit_BBIO.GPIO as GPIO def cleanup_gpio(event): @@ -33,33 +34,41 @@ def prepare_gpio(event): return True +# noqa: F821 + def setup_output(pin): """Setup a GPIO as output.""" + # pylint: disable=import-error,undefined-variable import Adafruit_BBIO.GPIO as GPIO GPIO.setup(pin, GPIO.OUT) def setup_input(pin, pull_mode): """Setup a GPIO as input.""" + # pylint: disable=import-error,undefined-variable import Adafruit_BBIO.GPIO as GPIO - GPIO.setup(pin, GPIO.IN, - GPIO.PUD_DOWN if pull_mode == 'DOWN' else GPIO.PUD_UP) + GPIO.setup(pin, GPIO.IN, # noqa: F821 + GPIO.PUD_DOWN if pull_mode == 'DOWN' # noqa: F821 + else GPIO.PUD_UP) # noqa: F821 def write_output(pin, value): """Write a value to a GPIO.""" + # pylint: disable=import-error,undefined-variable import Adafruit_BBIO.GPIO as GPIO GPIO.output(pin, value) def read_input(pin): """Read a value from a GPIO.""" + # pylint: disable=import-error,undefined-variable import Adafruit_BBIO.GPIO as GPIO return GPIO.input(pin) def edge_detect(pin, event_callback, bounce): """Add detection for RISING and FALLING events.""" + # pylint: disable=import-error,undefined-variable import Adafruit_BBIO.GPIO as GPIO GPIO.add_event_detect( pin, diff --git a/requirements_all.txt b/requirements_all.txt index 78f0bba24e9fac..f8e1c0c446c29c 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -13,7 +13,7 @@ async_timeout==1.1.0 --only-binary=all http://github.com/getSenic/nuimo-linux-python/archive/29fc42987f74d8090d0e2382e8f248ff5990b8c9.zip#nuimo==1.0.0 # homeassistant.components.bbb_gpio -Adafruit_BBIO==1.0.0 +# Adafruit_BBIO==1.0.0 # homeassistant.components.isy994 PyISY==1.0.7 diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index f4258ea825b02c..0231e0d51770f8 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -10,6 +10,7 @@ 'RPi.GPIO', 'rpi-rf', 'Adafruit_Python_DHT', + 'Adafruit_BBIO', 'fritzconnection', 'pybluez', 'bluepy',