Running the following command with Ruff 0.1.0:
ruff --target-version py312 --select F401 --isolated --no-cache blah.py
Given the following code:
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from collections.abc import Callable
from .foo import Record
type RecordCallback[R: Record] = Callable[[R], None]
def process_record[R: Record](record: R) -> None:
...
class RecordContainer[R: Record]:
def add_record(self, record: R) -> None:
...
F401 is reported on line 8, but Record is being used in the upper bound specifications.