-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[red-knot] rename {Class,Module,Function} => {Class,Module,Function}L…
…iteral (#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 <[email protected]>
- Loading branch information
1 parent
c6ce52c
commit f335fe4
Showing
6 changed files
with
163 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.