fix: use Python 3.9 compatible builtin generics

- Convert List[str] to list[str], Dict[str, Any] to dict[str, Any], etc.
- Use ruff --unsafe-fixes to automatically apply all type annotation updates
- Remove deprecated typing imports (List, Dict, Tuple) where no longer needed
- Keep Optional[str] syntax (union operator | not supported in Python 3.9)

Now all type annotations are Python 3.9 compatible with modern builtin generics.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andy Lee
2025-08-10 00:38:33 +00:00
parent ffba435252
commit 6d1ac4a503
11 changed files with 49 additions and 49 deletions

View File

@@ -12,7 +12,7 @@ import shutil
import subprocess
import tempfile
from pathlib import Path
from typing import Optional, Tuple
from typing import Optional
class GraphPartitioner:
@@ -92,7 +92,7 @@ class GraphPartitioner:
output_dir: Optional[str] = None,
partition_prefix: Optional[str] = None,
**kwargs,
) -> Tuple[str, str]:
) -> tuple[str, str]:
"""
Partition a disk-based index for improved performance.
@@ -267,7 +267,7 @@ def partition_graph(
partition_prefix: Optional[str] = None,
build_type: str = "release",
**kwargs,
) -> Tuple[str, str]:
) -> tuple[str, str]:
"""
Convenience function to partition a graph index.