mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:26 +00:00
Add containers to E721 types (#6469)
Related to https://github.com/astral-sh/ruff/issues/6465.
This commit is contained in:
parent
0252995973
commit
7eea0e94a2
1 changed files with 9 additions and 1 deletions
|
@ -103,7 +103,15 @@ pub(crate) fn type_comparison(checker: &mut Checker, compare: &ast::ExprCompare)
|
|||
// Ex) `type(obj) is int`
|
||||
if matches!(
|
||||
id.as_str(),
|
||||
"int" | "str" | "float" | "bool" | "complex" | "bytes"
|
||||
"int"
|
||||
| "str"
|
||||
| "float"
|
||||
| "bool"
|
||||
| "complex"
|
||||
| "bytes"
|
||||
| "list"
|
||||
| "dict"
|
||||
| "set"
|
||||
) && checker.semantic().is_builtin(id)
|
||||
{
|
||||
checker
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue