returns True if type_'s attr is not inherited from any of its base classes
(type_, attr)
| 102 | |
| 103 | |
| 104 | def attr_is_not_inherited(type_, attr): |
| 105 | """ |
| 106 | returns True if type_'s attr is not inherited from any of its base classes |
| 107 | """ |
| 108 | bases = type_.__mro__[1:] |
| 109 | return getattr(type_, attr) not in (getattr(base, attr, None) for base in bases) |
| 110 | |
| 111 | |
| 112 | def extra_info(obj): |
no test coverage detected