mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	Create base touchscreen component and refactor ektf2232 (#3083)
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
This commit is contained in:
		| @@ -20,7 +20,7 @@ def find_all(a_str, sub): | ||||
|         # Optimization: If str is not in whole text, then do not try | ||||
|         # on each line | ||||
|         return | ||||
|     for i, line in enumerate(a_str.split('\n')): | ||||
|     for i, line in enumerate(a_str.split("\n")): | ||||
|         column = 0 | ||||
|         while True: | ||||
|             column = line.find(sub, column) | ||||
| @@ -592,6 +592,8 @@ def lint_inclusive_language(fname, match): | ||||
|     include=["*.h", "*.tcc"], | ||||
|     exclude=[ | ||||
|         "esphome/components/binary_sensor/binary_sensor.h", | ||||
|         "esphome/components/button/button.h", | ||||
|         "esphome/components/climate/climate.h", | ||||
|         "esphome/components/cover/cover.h", | ||||
|         "esphome/components/display/display_buffer.h", | ||||
|         "esphome/components/fan/fan.h", | ||||
| @@ -606,8 +608,6 @@ def lint_inclusive_language(fname, match): | ||||
|         "esphome/components/stepper/stepper.h", | ||||
|         "esphome/components/switch/switch.h", | ||||
|         "esphome/components/text_sensor/text_sensor.h", | ||||
|         "esphome/components/climate/climate.h", | ||||
|         "esphome/components/button/button.h", | ||||
|         "esphome/core/component.h", | ||||
|         "esphome/core/gpio.h", | ||||
|         "esphome/core/log.h", | ||||
| @@ -666,7 +666,10 @@ run_checks(LINT_POST_CHECKS, "POST") | ||||
| for f, errs in sorted(errors.items()): | ||||
|     bold = functools.partial(styled, colorama.Style.BRIGHT) | ||||
|     bold_red = functools.partial(styled, (colorama.Style.BRIGHT, colorama.Fore.RED)) | ||||
|     err_str = (f"{bold(f'{f}:{lineno}:{col}:')} {bold_red('lint:')} {msg}\n" for lineno, col, msg in errs) | ||||
|     err_str = ( | ||||
|         f"{bold(f'{f}:{lineno}:{col}:')} {bold_red('lint:')} {msg}\n" | ||||
|         for lineno, col, msg in errs | ||||
|     ) | ||||
|     print_error_for_file(f, "\n".join(err_str)) | ||||
|  | ||||
| if args.print_slowest: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user