ruff/crates/red_knot_python_semantic
David Peter f335fe4d4a
[red-knot] rename {Class,Module,Function} => {Class,Module,Function}Literal (#13873)
## Summary

* Rename `Type::Class` => `Type::ClassLiteral`
* Rename `Type::Function` => `Type::FunctionLiteral`
* Do not rename `Type::Module`
* Remove `*Literal` suffixes in `display::LiteralTypeKind` variants, as
per clippy suggestion
* Get rid of `Type::is_class()` in favor of `is_subtype_of(…, 'type')`;
modifiy `is_subtype_of` to support this.
* Add new `Type::is_xyz()` methods and use them instead of matching on
`Type` variants.

closes #13863 

## Test Plan

New `is_subtype_of_class_literals` unit test.

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-10-22 22:10:53 +02:00
..
resources [red-knot] Treat empty intersection as 'object', fix intersection simplification (#13880) 2024-10-22 21:02:46 +02:00
src [red-knot] rename {Class,Module,Function} => {Class,Module,Function}Literal (#13873) 2024-10-22 22:10:53 +02:00
tests [red-knot] Cleanup generated names of mdtest tests (#13831) 2024-10-20 15:11:53 +00:00
build.rs Modernize build scripts (#13837) 2024-10-20 22:35:35 +01:00
Cargo.toml [red-knot] Cleanup generated names of mdtest tests (#13831) 2024-10-20 15:11:53 +00:00