From c123f0091d96a0200775d0184f8f45495a346561 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Thu, 28 Feb 2019 10:33:22 +0100 Subject: [PATCH] Upgrade pylint on python 3 to fix travis --- .travis.yml | 4 ++-- esphome/config_validation.py | 4 ++-- esphome/pins.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index f2895cd950..1c610f39da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ matrix: - pylint esphome - python: "3.5.3" env: TARGET=Lint3.5 - install: pip install -U https://github.com/platformio/platformio-core/archive/develop.zip && pip install -e . && pip install flake8==3.6.0 pylint==2.2.2 pillow + install: pip install -U https://github.com/platformio/platformio-core/archive/develop.zip && pip install -e . && pip install flake8==3.6.0 pylint==2.3.0 pillow script: - flake8 esphome - pylint esphome @@ -25,7 +25,7 @@ matrix: - esphome tests/test3.yaml compile #- python: "3.5.3" # env: TARGET=Test3.5 - # install: pip install -U https://github.com/platformio/platformio-core/archive/develop.zip && pip install -e . && pip install flake8==3.6.0 pylint==2.2.2 pillow + # install: pip install -U https://github.com/platformio/platformio-core/archive/develop.zip && pip install -e . && pip install flake8==3.6.0 pylint==2.3.0 pillow # script: # - esphome tests/test1.yaml compile # - esphome tests/test2.yaml compile diff --git a/esphome/config_validation.py b/esphome/config_validation.py index e5aecff729..ad7372e738 100644 --- a/esphome/config_validation.py +++ b/esphome/config_validation.py @@ -292,7 +292,7 @@ def time_period_str_colon(value): """Validate and transform time offset with format HH:MM[:SS].""" if isinstance(value, int): raise vol.Invalid('Make sure you wrap time values in quotes') - elif not isinstance(value, str): + if not isinstance(value, str): raise vol.Invalid(TIME_PERIOD_ERROR.format(value)) try: @@ -316,7 +316,7 @@ def time_period_str_unit(value): if isinstance(value, int): raise vol.Invalid("Don't know what '{0}' means as it has no time *unit*! Did you mean " "'{0}s'?".format(value)) - elif not isinstance(value, string_types): + if not isinstance(value, string_types): raise vol.Invalid("Expected string for time period with unit.") unit_to_kwarg = { diff --git a/esphome/pins.py b/esphome/pins.py index 8049c8bf86..7542018783 100644 --- a/esphome/pins.py +++ b/esphome/pins.py @@ -290,7 +290,7 @@ def analog_pin(value): if 32 <= value <= 39: # ADC1 return value raise vol.Invalid(u"ESP32: Only pins 32 though 39 support ADC.") - elif CORE.is_esp8266: + if CORE.is_esp8266: if value == 17: # A0 return value raise vol.Invalid(u"ESP8266: Only pin A0 (17) supports ADC.")