for c in classes:
if c.__bases__:
for parent in c.__bases__:
- if not parent in children:
+ if parent not in children:
children[parent] = []
if c not in children[parent]:
children[parent].append(c)
except KeyError:
pass
else:
- if not (type(class_dict) is types.GetSetDescriptorType and
+ if not (isinstance(class_dict, types.GetSetDescriptorType) and
class_dict.__name__ == "__dict__" and
class_dict.__objclass__ is entry):
return class_dict
klass = type(obj)
dict_attr = _shadowed_dict(klass)
if (dict_attr is _sentinel or
- type(dict_attr) is types.MemberDescriptorType):
+ isinstance(dict_attr, types.MemberDescriptorType)):
instance_result = _check_instance(obj, attr)
else:
klass = obj
def parse_name(node):
assert isinstance(node, ast.arg)
- if node.annotation != None:
+ if node.annotation is not None:
raise ValueError("Annotations are not currently supported")
return node.arg