Update deprecated Python 3.8 typing (#13971)

This commit is contained in:
Harry Mellor
2025-03-02 17:34:51 -08:00
committed by GitHub
parent bf33700ecd
commit cf069aa8aa
300 changed files with 2294 additions and 2347 deletions
+3 -3
View File
@@ -2,7 +2,7 @@
import tempfile
from collections import OrderedDict
from typing import Dict, List, TypedDict
from typing import TypedDict
from unittest.mock import MagicMock, patch
import pytest
@@ -37,7 +37,7 @@ class ContextInfo(TypedDict):
context_length: str
LONG_LORA_INFOS: List[ContextIDInfo] = [{
LONG_LORA_INFOS: list[ContextIDInfo] = [{
"lora_id": 1,
"context_length": "16k",
}, {
@@ -290,7 +290,7 @@ def long_context_infos(long_context_lora_files_16k_1,
long_context_lora_files_16k_2,
long_context_lora_files_32k):
cleanup_dist_env_and_memory(shutdown_ray=True)
infos: Dict[int, ContextInfo] = {}
infos: dict[int, ContextInfo] = {}
for lora_checkpoint_info in LONG_LORA_INFOS:
lora_id = lora_checkpoint_info["lora_id"]
if lora_id == 1: