[pyflakes] Visit forward annotations in TypeAliasType as types (F401) (#15829)

## Summary

Fixes https://github.com/astral-sh/ruff/issues/15812 by visiting the
second argument as a type definition.

## Test Plan

New F401 tests based on the report.

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Brent Westbrook 2025-01-30 18:06:38 -05:00 committed by GitHub
parent 4f2aea8d50
commit fe516e24f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 136 additions and 3 deletions

View file

@ -28,6 +28,7 @@ pub enum Callable {
NamedTuple,
TypedDict,
MypyExtension,
TypeAliasType,
}
#[derive(Debug, Copy, Clone)]