Skip to content

Commit

Permalink
Add to other branch
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Nov 4, 2023
1 parent 1ddc272 commit 0f92719
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ fn deprecated_type_comparison(checker: &mut Checker, compare: &ast::ExprCompare)
| "list"
| "dict"
| "set"
| "memoryview"
) && checker.semantic().is_builtin(id)
{
checker.diagnostics.push(Diagnostic::new(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ E721.py:5:4: E721 Do not compare types, use `isinstance()`
7 | #: E721
|

E721.py:8:4: E721 Do not compare types, use `isinstance()`
|
6 | pass
7 | #: E721
8 | if type(res) == memoryview:
| ^^^^^^^^^^^^^^^^^^^^^^^ E721
9 | pass
10 | #: Okay
|

E721.py:18:4: E721 Do not compare types, use `isinstance()`
|
16 | import types
Expand Down

0 comments on commit 0f92719

Please sign in to comment.