summaryrefslogtreecommitdiff
path: root/testsuite/E72.py
diff options
context:
space:
mode:
authorPavel Savchenko <asfaltboy@gmail.com>2021-12-12 09:24:39 +0000
committerPavel Savchenko <asfaltboy@gmail.com>2021-12-12 09:24:39 +0000
commitdcedb98f17514cc3174313fd0f009d460fa7babb (patch)
tree8a0c30a45cd5a43a422e42592ba4885ae55d5645 /testsuite/E72.py
parentf3ee72b75a4df32221ab08d315e0614a59c17f26 (diff)
downloadpep8-dcedb98f17514cc3174313fd0f009d460fa7babb.tar.gz
Correct test assertions for E721
* `type(a) is type(b)` should still fail * same for `type(a) != type(b) or type(a) == type(ccc)` * We cannot assume `res == types.IntType` is wrong as the identity of the objects is not known at check time, either way it shouldn't be a E721 as it doesn't involve type(...) function as described in PEP8
Diffstat (limited to 'testsuite/E72.py')
-rw-r--r--testsuite/E72.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/testsuite/E72.py b/testsuite/E72.py
index e789d82..bba55f5 100644
--- a/testsuite/E72.py
+++ b/testsuite/E72.py
@@ -4,7 +4,7 @@ if type(res) == type(42):
#: E721
if type(res) != type(""):
pass
-#: E721
+#: Okay
import types
if res == types.IntType:
@@ -47,8 +47,6 @@ if isinstance(res, str):
pass
if isinstance(res, types.MethodType):
pass
-if type(a) != type(b) or type(a) == type(ccc):
- pass
#: Okay
def func_histype(a, b, c):
pass