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 - pylint esphome
- python: "3.5.3" - python: "3.5.3"
env: TARGET=Lint3.5 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: script:
- flake8 esphome - flake8 esphome
- pylint esphome - pylint esphome
@ -25,7 +25,7 @@ matrix:
- esphome tests/test3.yaml compile - esphome tests/test3.yaml compile
#- python: "3.5.3" #- python: "3.5.3"
# env: TARGET=Test3.5 # 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: # script:
# - esphome tests/test1.yaml compile # - esphome tests/test1.yaml compile
# - esphome tests/test2.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].""" """Validate and transform time offset with format HH:MM[:SS]."""
if isinstance(value, int): if isinstance(value, int):
raise vol.Invalid('Make sure you wrap time values in quotes') 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)) raise vol.Invalid(TIME_PERIOD_ERROR.format(value))
try: try:
@ -316,7 +316,7 @@ def time_period_str_unit(value):
if isinstance(value, int): if isinstance(value, int):
raise vol.Invalid("Don't know what '{0}' means as it has no time *unit*! Did you mean " raise vol.Invalid("Don't know what '{0}' means as it has no time *unit*! Did you mean "
"'{0}s'?".format(value)) "'{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.") raise vol.Invalid("Expected string for time period with unit.")
unit_to_kwarg = { unit_to_kwarg = {

View file

@ -290,7 +290,7 @@ def analog_pin(value):
if 32 <= value <= 39: # ADC1 if 32 <= value <= 39: # ADC1
return value return value
raise vol.Invalid(u"ESP32: Only pins 32 though 39 support ADC.") raise vol.Invalid(u"ESP32: Only pins 32 though 39 support ADC.")
elif CORE.is_esp8266: if CORE.is_esp8266:
if value == 17: # A0 if value == 17: # A0
return value return value
raise vol.Invalid(u"ESP8266: Only pin A0 (17) supports ADC.") raise vol.Invalid(u"ESP8266: Only pin A0 (17) supports ADC.")