We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a1ca96 commit f3a7d05Copy full SHA for f3a7d05
src/esphome_glyphsets/__init__.py
@@ -22,9 +22,9 @@ def unicodes_per_glyphset(glyphset_name: str) -> list[int]:
22
nam_path = GLYPHSETS_NAM_PATH / f"{glyphset_name}.nam"
23
if not nam_path.exists():
24
return []
25
- character_set: set[int] = set()
26
- for line in nam_path.read_text().splitlines():
27
- unicode = line.partition(" ")[0]
28
- if unicode.startswith("0x"):
29
- character_set.add(int(unicode[2:], 16))
+ character_set = {
+ int(line.partition(" ")[0][2:], 16)
+ for line in nam_path.read_text().splitlines()
+ if line.startswith("0x")
+ }
30
return sorted(character_set)
0 commit comments