ty currently only has partial support for legacy aliases such as Dict, List, FrozenSet, etc. For example, these two reveal_type calls should both reveal dict[str, int], but the second one does not:
from typing import Dict
def f(x: dict[str, int], y: Dict[str, int]):
reveal_type(x) # revealed: dict[str, int]
reveal_type(y) # revealed: dict[Unknown, Unknown]
We now support generics, so this should be fairly easy to fix. We need to resolve the TODOs in this area of the code: https://github.com/astral-sh/ruff/blob/ad2f667ee4323dd0c12224338734d722d13d28b4/crates/ty_python_semantic/src/types/infer.rs#L8753-L8789