Skip to content

Commit

Permalink
Add containers to E721 types (astral-sh#6469)
Browse files Browse the repository at this point in the history
Related to astral-sh#6465.
  • Loading branch information
charliermarsh authored and durumu committed Aug 12, 2023
1 parent d05a9d7 commit 7441f30
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 7441f30

Please sign in to comment.