mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 13:30:49 -05:00
## Summary Resolve https://github.com/astral-sh/ty/issues/2226 We need to add a special case in `apply_type_mapping` instead of directly in `promote_literals_impl` because we do not reach this with non generic non tuple nominal instances. We still ensure we apply the normal mapping if we do not see `float` or `complex` instances. ## Test Plan Update existing mdtest and add a new case to `literal_promotion.md`
Markdown files within the mdtest/ subdirectory are tests of type inference and type checking;
executed by the tests/mdtest.rs integration test.
See crates/ty_test/README.md for documentation of this test format.