ruff/crates/red_knot_python_semantic
Carl Meyer e2a38e4c00
[red-knot] optimize is_subtype_of for literals (#17394)
## Summary

Allows us to establish that two literals do not have a subtype
relationship with each other, without having to fallback to a typeshed
Instance type, which is comparatively slow.

Improves the performance of the many-string-literals union benchmark by
5x.

## Test Plan

`cargo test -p red_knot_python_semantic` and `cargo bench --bench
red_knot`.
2025-04-14 09:42:44 -07:00
..
resources [red-knot] Document limitations of diagnostics-silencing in unreachable code (#17387) 2025-04-14 12:55:14 +02:00
src [red-knot] optimize is_subtype_of for literals (#17394) 2025-04-14 09:42:44 -07:00
tests [red-knot] Add GitHub PR annotations when mdtests fail in CI (#17150) 2025-04-02 21:51:52 +01:00
build.rs Modernize build scripts (#13837) 2024-10-20 22:35:35 +01:00
Cargo.toml [red-knot] Add a test to ensure that KnownClass::try_from_file_and_name() is kept up to date (#16326) 2025-02-24 12:14:20 +00:00
mdtest.py mdtest.py: do a full mdtest run immediately when the script is executed (#17128) 2025-04-01 19:27:55 +01:00
mdtest.py.lock [red-knot] Markdown test runner (#15632) 2025-01-21 14:06:35 +01:00