mirror of https://github.com/astral-sh/ruff
Resolves https://github.com/astral-sh/ruff/issues/20512 This PR expands FA102’s preview coverage to flag every PEP 585-compatible API that breaks without from `from __future__ import annotations`, including `collections.abc`. The rule now treats asyncio futures, pathlib-style queues, weakref containers, shelve proxies, and the full `collections.abc` family as generics once preview mode is enabled. Stable behavior is unchanged; the broader matching runs behind `is_future_required_preview_generics_enabled`, letting us vet the new diagnostics before marking them as stable. I've also added a snapshot test that covers all of the newly supported types. Check out https://docs.python.org/3/library/stdtypes.html#standard-generic-classes for a list of commonly used PEP 585-compatible APIs. |
||
|---|---|---|
| .. | ||
| class.rs | ||
| function_type.rs | ||
| imports.rs | ||
| logging.rs | ||
| mod.rs | ||
| terminal.rs | ||
| type_inference.rs | ||
| typing.rs | ||
| visibility.rs | ||