@@ -993,7 +993,7 @@ def getclasstree(classes, unique=False):
993
993
for c in classes :
994
994
if c .__bases__ :
995
995
for parent in c .__bases__ :
996
- if not parent in children :
996
+ if parent not in children :
997
997
children [parent ] = []
998
998
if c not in children [parent ]:
999
999
children [parent ].append (c )
@@ -1538,7 +1538,7 @@ def _shadowed_dict(klass):
1538
1538
except KeyError :
1539
1539
pass
1540
1540
else :
1541
- if not (type (class_dict ) is types .GetSetDescriptorType and
1541
+ if not (isinstance (class_dict , types .GetSetDescriptorType ) and
1542
1542
class_dict .__name__ == "__dict__" and
1543
1543
class_dict .__objclass__ is entry ):
1544
1544
return class_dict
@@ -1560,7 +1560,7 @@ def getattr_static(obj, attr, default=_sentinel):
1560
1560
klass = type (obj )
1561
1561
dict_attr = _shadowed_dict (klass )
1562
1562
if (dict_attr is _sentinel or
1563
- type (dict_attr ) is types .MemberDescriptorType ):
1563
+ isinstance (dict_attr , types .MemberDescriptorType ) ):
1564
1564
instance_result = _check_instance (obj , attr )
1565
1565
else :
1566
1566
klass = obj
@@ -1975,7 +1975,7 @@ def _signature_fromstr(cls, obj, s, skip_bound_arg=True):
1975
1975
1976
1976
def parse_name (node ):
1977
1977
assert isinstance (node , ast .arg )
1978
- if node .annotation != None :
1978
+ if node .annotation is not None :
1979
1979
raise ValueError ("Annotations are not currently supported" )
1980
1980
return node .arg
1981
1981
0 commit comments