Skip to main content

Fix some typing issues

ID
100cfe3
date
2025-12-02 08:11:00+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
ac5c0ba
message
Fix some typing issues
changed files
3 files, 4 additions, 5 deletions

Changed files

generate_palette_files.py (18626) → generate_palette_files.py (18632)

diff --git a/generate_palette_files.py b/generate_palette_files.py
index 669eccb..46c693c 100755
--- a/generate_palette_files.py
+++ b/generate_palette_files.py
@@ -131,7 +131,7 @@ iTermColour = TypedDict(
     "iTermColour",
     {
         "Red Component": float,
-        "Gren Component": float,
+        "Green Component": float,
         "Blue Component": float,
         "Alpha Component": float,
         "Color Space": str,
@@ -139,7 +139,7 @@ iTermColour = TypedDict(
 )
 
 
-def to_iterm2_colour(hex_string) -> iTermColour:
+def to_iterm2_colour(hex_string: str) -> iTermColour:
     r_255 = int(hex_string[1:3], 16)
     g_255 = int(hex_string[3:5], 16)
     b_255 = int(hex_string[5:7], 16)

palette.py (814) → palette.py (761)

diff --git a/palette.py b/palette.py
index 6620da4..61d3554 100644
--- a/palette.py
+++ b/palette.py
@@ -15,14 +15,11 @@ class BaseColours(TypedDict):
 
 
 class Colours(BaseColours):
-    background: str
-    text: str
     comment: str
     literal: str
     string: str
     name: str
     punctuation: str
-    highlight: str
 
 
 def enrich_colours(c: BaseColours) -> Colours:

vendor_css_files.py (4507) → vendor_css_files.py (4561)

diff --git a/vendor_css_files.py b/vendor_css_files.py
index 6ce7029..8ad6a78 100755
--- a/vendor_css_files.py
+++ b/vendor_css_files.py
@@ -89,6 +89,7 @@ if __name__ == "__main__":
         "magenta": get_colour_variable(syntax_css, name="--magenta"),
         "yellow": get_colour_variable(syntax_css, name="--yellow"),
         "highlight": get_colour_variable(syntax_css, name="--highlight"),
+        "cyan": "#2dceb7",
     }
 
     # Get the first block of dark theme colours from the syntax highlighting
@@ -104,6 +105,7 @@ if __name__ == "__main__":
         "magenta": get_colour_variable(dark_syntax_css, name="--magenta"),
         "yellow": get_colour_variable(dark_syntax_css, name="--yellow"),
         "highlight": get_colour_variable(dark_syntax_css, name="--highlight"),
+        "cyan": "#41f1df",
     }
 
     # When I do <mark> highlights on my blog, I keep the text black in