Skip to content

Commit

Permalink
Add containers to E721 types (#6469)
Browse files Browse the repository at this point in the history
Related to #6465.
  • Loading branch information
charliermarsh authored Aug 10, 2023
1 parent 0252995 commit 7eea0e9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion crates/ruff/src/rules/pycodestyle/rules/type_comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7eea0e9

Please sign in to comment.