/
E72.py
50 lines (46 loc) · 950 Bytes
/
E72.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#: E721
if isinstance(res, type(42)):
pass
#: E721
if not isinstance(res, type("")):
pass
#: E721
import types
if res == types.IntType:
pass
#: E721
import types
if type(res) is not types.ListType:
pass
#: E721
assert isinstance(res, type(False)) or isinstance(res, type(None))
#: E721
assert isinstance(res, type([]))
#: E721
assert isinstance(res, type(()))
#: E721
assert isinstance(res, type((0,)))
#: E721
assert isinstance(res, type((0)))
#: E721
assert not isinstance(res, type((1, )))
#: Okay
assert type(res) is type((1, ))
#: Okay
assert type(res) is not type((1, ))
#: E211 E721
assert isinstance(res, type([2, ]))
#: E201 E201 E202 E721
assert isinstance(res, type(()))
#: E201 E202 E721
assert isinstance(res, type((0, )))
#:
#: Okay
if isinstance(res, int):
pass
if isinstance(res, str):
pass
if isinstance(res, types.MethodType):
pass
if not isinstance(a, type(b)) or isinstance(a, type(ccc)):
pass