Add containers to E721 types (#6469)

Related to https://github.com/astral-sh/ruff/issues/6465.
This commit is contained in:
Charlie Marsh 2023-08-09 22:34:51 -04:00 committed by GitHub
parent 0252995973
commit 7eea0e94a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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