Earlier quoted context omitted.
Annotating empty collections is one of the few places you need to annotate outside function signatures. It's not a big deal. It doesn't happen that often.
And, when it does, you can just put them when the empty container is assigned: things: set[tuple[str, str, int]] = set() users: list[User] = [] Many people don't seem to know this exists.
In fact, I recently migrated a project from Pyright to Pyrefly for performance reasons, and there was very little I had to change between. The most annoying thing was Pyrefly's lack of exhaustive pattern matching for StrEnum and Literal[...]