File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,6 @@ def compatible(meth_sig, iface_sig):
20
20
return meth_sig == iface_sig
21
21
22
22
23
- def strict_issubclass (t , parent ):
24
- return issubclass (t , parent ) and t is not parent
25
-
26
-
27
23
class InterfaceMeta (type ):
28
24
"""
29
25
Metaclass for interfaces.
@@ -144,12 +140,6 @@ class Interface(metaclass=InterfaceMeta):
144
140
"""
145
141
146
142
147
- class Implements :
148
- """
149
- Base class for an implementation of an interface.
150
- """
151
-
152
-
153
143
class ImplementsMeta (type ):
154
144
"""
155
145
Metaclass for implementations of particular interfaces.
@@ -178,7 +168,7 @@ def interfaces(self):
178
168
iface : Interface
179
169
"""
180
170
for base in self .mro ():
181
- if strict_issubclass (base , Implements ):
171
+ if isinstance (base , ImplementsMeta ):
182
172
yield base .interface
183
173
184
174
@@ -235,7 +225,7 @@ def implements(I):
235
225
)
236
226
return ImplementsMeta (
237
227
name ,
238
- (Implements ,),
228
+ (object ,),
239
229
{'__doc__' : doc , 'interface' : I },
240
230
base = True ,
241
231
)
You can’t perform that action at this time.
0 commit comments