Commit 8f035ca6 authored by Michel Pelletier's avatar Michel Pelletier

simplified

parent b7778d1a
...@@ -29,13 +29,16 @@ def verify_class_implementation(iface, klass): ...@@ -29,13 +29,16 @@ def verify_class_implementation(iface, klass):
elif type(attr) is types.MethodType: elif type(attr) is types.MethodType:
meth = Method().fromMethod(attr, n) meth = Method().fromMethod(attr, n)
else: else:
raise "NotAMethod", "%s is not a method or function" % attr pass # must be an attribute...
methinfo = meth.getSignatureInfo() if d.getSignatureInfo() != meth.getSignatureInfo():
attrinfo = meth.getSignatureInfo() raise BrokenMethodImplementation(n)
for k in d.getSignatureInfo().keys():
if not (methinfo[k] is attrinfo[k] or methinfo[k] == attrinfo[k]):
raise BrokenMethodImplementation(n, k)
return 1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment