Skip to content

Commit 0fd3199

Browse files
author
Scott Sanderson
committed
MAINT: Remove unnecessary base class.
1 parent 8949a91 commit 0fd3199

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

interface/interface.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ def compatible(meth_sig, iface_sig):
2020
return meth_sig == iface_sig
2121

2222

23-
def strict_issubclass(t, parent):
24-
return issubclass(t, parent) and t is not parent
25-
26-
2723
class InterfaceMeta(type):
2824
"""
2925
Metaclass for interfaces.
@@ -144,12 +140,6 @@ class Interface(metaclass=InterfaceMeta):
144140
"""
145141

146142

147-
class Implements:
148-
"""
149-
Base class for an implementation of an interface.
150-
"""
151-
152-
153143
class ImplementsMeta(type):
154144
"""
155145
Metaclass for implementations of particular interfaces.
@@ -178,7 +168,7 @@ def interfaces(self):
178168
iface : Interface
179169
"""
180170
for base in self.mro():
181-
if strict_issubclass(base, Implements):
171+
if isinstance(base, ImplementsMeta):
182172
yield base.interface
183173

184174

@@ -235,7 +225,7 @@ def implements(I):
235225
)
236226
return ImplementsMeta(
237227
name,
238-
(Implements,),
228+
(object,),
239229
{'__doc__': doc, 'interface': I},
240230
base=True,
241231
)

0 commit comments

Comments
 (0)