ruff
7aae8090 - [red-knot] add support for typing_extensions.reveal_type (#13397)

Commit
1 year ago
[red-knot] add support for typing_extensions.reveal_type (#13397) Before `typing.reveal_type` existed, there was `typing_extensions.reveal_type`. We should support both. Also adds a test to verify that we can handle aliasing of `reveal_type` to a different name. Adds a bit of code to ensure that if we have a union of different `reveal_type` functions (e.g. a union containing both `typing_extensions.reveal_type` and `typing.reveal_type`) we still emit the reveal-type diagnostic only once. This is probably unlikely in practice, but it doesn't hurt to handle it smoothly. (It comes up now because we don't support `version_info` checks yet, so `typing_extensions.reveal_type` is actually that union.) --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Author
Parents
Loading