Skip to content

Commit 7eea0e9

Browse files
Add containers to E721 types (#6469)
Related to #6465.
1 parent 0252995 commit 7eea0e9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

crates/ruff/src/rules/pycodestyle/rules/type_comparison.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,15 @@ pub(crate) fn type_comparison(checker: &mut Checker, compare: &ast::ExprCompare)
103103
// Ex) `type(obj) is int`
104104
if matches!(
105105
id.as_str(),
106-
"int" | "str" | "float" | "bool" | "complex" | "bytes"
106+
"int"
107+
| "str"
108+
| "float"
109+
| "bool"
110+
| "complex"
111+
| "bytes"
112+
| "list"
113+
| "dict"
114+
| "set"
107115
) && checker.semantic().is_builtin(id)
108116
{
109117
checker

0 commit comments

Comments
 (0)