ruff
b6e75e58 - Treat type aliases as typing-only expressions (#7968)

Commit
2 years ago
Treat type aliases as typing-only expressions (#7968) ## Summary Given `type RecordOrThings = Record | int | str`, the right-hand side won't be evaluated at runtime. Same goes for `Record` in `type RecordCallback[R: Record] = Callable[[R], None]`. This PR modifies the visitation logic to treat them as typing-only. Closes https://github.com/astral-sh/ruff/issues/7966.
Author
Parents
Loading