mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00: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:
		| @@ -3,7 +3,6 @@ import esphome.config_validation as cv | ||||
| from esphome import automation | ||||
| from esphome.components import time | ||||
| from esphome.const import CONF_TIME_ID, CONF_ID, CONF_TRIGGER_ID | ||||
| from esphome.py_compat import string_types | ||||
|  | ||||
| sun_ns = cg.esphome_ns.namespace('sun') | ||||
|  | ||||
| @@ -32,7 +31,7 @@ ELEVATION_MAP = { | ||||
|  | ||||
|  | ||||
| def elevation(value): | ||||
|     if isinstance(value, string_types): | ||||
|     if isinstance(value, str): | ||||
|         try: | ||||
|             value = ELEVATION_MAP[cv.one_of(*ELEVATION_MAP, lower=True, space='_')(value)] | ||||
|         except cv.Invalid: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user