The return type hint dict | None is supported since Python 3.10. The following line triggers a TypeError if python3 invokes system's Python <3.10 (e.g., on macOS, 3.9.x seems to be the default version):
|
def get_state(session_id: str) -> dict | None: |
I think a simple from __future__ import annotations works fine.
The return type hint
dict | Noneis supported since Python 3.10. The following line triggers aTypeErrorifpython3invokes system's Python <3.10 (e.g., on macOS, 3.9.x seems to be the default version):claude-streaming-compactor/compactor/compactor.py
Line 141 in 02de092
I think a simple
from __future__ import annotationsworks fine.