Commit 5f1ff9c
authored
fix: Python 3.8 compatibility - replace PEP 585 type syntax with typing module imports (#24)
* fix: replace Python 3.9+ type syntax with Python 3.8-compatible typing imports
- Replace dict[K, V] with Dict[K, V] from typing module
- Replace list[T] with List[T] from typing module
- Fixes Python 3.8 compatibility broken by actions/setup-python v6 upgrade
- Affected files: constants.py, utils.py, writer.py
- All tests pass on Python 3.8, 3.9, and 3.12
- Resolves TypeError: 'type' object is not subscriptable on Python 3.8
The codebase used Python 3.9+ PEP 585 syntax (dict[...], list[...]) which
is incompatible with Python 3.8. This was exposed when GitHub Actions
upgraded actions/setup-python from v5 to v6, which installs a stricter
Python 3.8 build that properly enforces type annotation restrictions.
This fix ensures the project delivers on its Python 3.8+ support claim
in pyproject.toml (requires-python = '>=3.8').
* chore: remove FIX_PLAN.md - no longer needed1 parent d1ed0e9 commit 5f1ff9c
3 files changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments