The following patterns still break mypy:
1. `type[]` at top level fails
2. `tuple[T1, T2]` at top level fails (but `tuple[T1, ...]` is fine)
3. `T1 | Callable[..., T2 | T3]` fails, but only <=3.9
This PR cleans up usage of `Union` and `Optional` outside these patterns.
* Update `asyncio.trsock` to reflect methods removed in 3.11
These were all removed in https://bugs.python.org/issue43232
* [pre-commit.ci] auto fixes from pre-commit.com hooks
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
I just found and fixed a bug in pyright's "missing type arguments" check. When type arguments were omitted for a generic type within a subscript expression, the error was being suppressed. With this bug fixed, I found several new cases where type arguments were missing in stdlib stubs. (#5130)
Co-authored-by: Eric Traut <erictr@microsoft.com>