1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-13 00:32:20 +01:00

Drop Python 2 Support (#793)

* Remove Python 2 support

* Remove u-strings

* Remove docker symlinks

* Remove from travis

* Update requirements

* Upgrade flake8/pylint

* Fixes

* Manual

* Run pyupgrade

* Lint

* Remove base_int

* Fix

* Update platformio_api.py

* Update component.cpp
This commit is contained in:
Otto Winter
2019-12-07 18:28:55 +01:00
committed by GitHub
parent b5714cd70f
commit 056c72d50d
78 changed files with 815 additions and 1097 deletions

View File

@@ -1,4 +1,3 @@
# coding=utf-8
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome import core, automation
@@ -27,7 +26,7 @@ DISPLAY_ROTATIONS = {
def validate_rotation(value):
value = cv.string(value)
if value.endswith(u"°"):
if value.endswith("°"):
value = value[:-1]
return cv.enum(DISPLAY_ROTATIONS, int=True)(value)