Upgrade pylint on python 3 to fix travis

This commit is contained in:
Otto Winter 2019-02-28 10:33:22 +01:00
parent 7c65d44976
commit c123f0091d
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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 = {

View File

@ -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.")