1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-10 07:12:21 +01:00

Bump python min to 3.9 (#3871)

This commit is contained in:
Jesse Hills
2022-10-05 20:09:27 +13:00
committed by GitHub
parent c3a8972550
commit d220d41182
25 changed files with 130 additions and 147 deletions

View File

@@ -40,7 +40,7 @@ def indent(text, padding=" "):
# From https://stackoverflow.com/a/14945195/8924614
def cpp_string_escape(string, encoding="utf-8"):
def _should_escape(byte): # type: (int) -> bool
def _should_escape(byte: int) -> bool:
if not 32 <= byte < 127:
return True
if byte in (ord("\\"), ord('"')):