mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	Fix flake8 warnings. (#17)
This commit is contained in:
		
				
					committed by
					
						 Otto Winter
						Otto Winter
					
				
			
			
				
	
			
			
			
						parent
						
							374ea7044c
						
					
				
				
					commit
					e8fe653140
				
			| @@ -8,7 +8,7 @@ from esphomeyaml.const import CONF_ACCURACY_DECIMALS, CONF_ALPHA, CONF_DEBOUNCE, | |||||||
|     CONF_MQTT_ID, CONF_MULTIPLY, CONF_NAME, CONF_OFFSET, CONF_ON_RAW_VALUE, CONF_ON_VALUE, \ |     CONF_MQTT_ID, CONF_MULTIPLY, CONF_NAME, CONF_OFFSET, CONF_ON_RAW_VALUE, CONF_ON_VALUE, \ | ||||||
|     CONF_ON_VALUE_RANGE, CONF_OR, CONF_SEND_EVERY, CONF_SLIDING_WINDOW_MOVING_AVERAGE, \ |     CONF_ON_VALUE_RANGE, CONF_OR, CONF_SEND_EVERY, CONF_SLIDING_WINDOW_MOVING_AVERAGE, \ | ||||||
|     CONF_THROTTLE, CONF_TRIGGER_ID, CONF_UNIQUE, CONF_UNIT_OF_MEASUREMENT, CONF_WINDOW_SIZE |     CONF_THROTTLE, CONF_TRIGGER_ID, CONF_UNIQUE, CONF_UNIT_OF_MEASUREMENT, CONF_WINDOW_SIZE | ||||||
| from esphomeyaml.helpers import App, ArrayInitializer, NAN, Pvariable, add, esphomelib_ns, float_, \ | from esphomeyaml.helpers import App, ArrayInitializer, Pvariable, add, esphomelib_ns, float_, \ | ||||||
|     process_lambda, setup_mqtt_component, templatable |     process_lambda, setup_mqtt_component, templatable | ||||||
|  |  | ||||||
| PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA.extend({ | PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA.extend({ | ||||||
|   | |||||||
| @@ -567,7 +567,6 @@ def setup_mqtt_component(obj, config): | |||||||
|                                  availability[CONF_PAYLOAD_NOT_AVAILABLE])) |                                  availability[CONF_PAYLOAD_NOT_AVAILABLE])) | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # shlex's quote for Python 2.7 | # shlex's quote for Python 2.7 | ||||||
| _find_unsafe = re.compile(r'[^\w@%+=:,./-]').search | _find_unsafe = re.compile(r'[^\w@%+=:,./-]').search | ||||||
|  |  | ||||||
|   | |||||||
| @@ -167,7 +167,7 @@ def write_platformio_ini(content, path): | |||||||
|         mkdir_p(os.path.dirname(path)) |         mkdir_p(os.path.dirname(path)) | ||||||
|         content_format = INI_BASE_FORMAT |         content_format = INI_BASE_FORMAT | ||||||
|     full_file = content_format[0] + INI_AUTO_GENERATE_BEGIN + '\n' + \ |     full_file = content_format[0] + INI_AUTO_GENERATE_BEGIN + '\n' + \ | ||||||
|                 content + INI_AUTO_GENERATE_END + content_format[1] |         content + INI_AUTO_GENERATE_END + content_format[1] | ||||||
|     if prev_file == full_file: |     if prev_file == full_file: | ||||||
|         return |         return | ||||||
|     with codecs.open(path, mode='w+', encoding='utf-8') as f_handle: |     with codecs.open(path, mode='w+', encoding='utf-8') as f_handle: | ||||||
| @@ -189,7 +189,7 @@ def write_cpp(code_s, path): | |||||||
|         code_format = CPP_BASE_FORMAT |         code_format = CPP_BASE_FORMAT | ||||||
|  |  | ||||||
|     full_file = code_format[0] + CPP_AUTO_GENERATE_BEGIN + '\n' + \ |     full_file = code_format[0] + CPP_AUTO_GENERATE_BEGIN + '\n' + \ | ||||||
|                 code_s + CPP_AUTO_GENERATE_END + code_format[1] |         code_s + CPP_AUTO_GENERATE_END + code_format[1] | ||||||
|     if prev_file == full_file: |     if prev_file == full_file: | ||||||
|         return |         return | ||||||
|     with codecs.open(path, 'w+', encoding='utf-8') as f_handle: |     with codecs.open(path, 'w+', encoding='utf-8') as f_handle: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user