feat(erg): add subclasshook method in abc.d.er

Add __subclasshook__ magic method which is used to implement the logic
that validates a class correctly conform to an interface.

Signed-off-by: Lionel H <lionel.hubaut@dekimo.com>
This commit is contained in:
Lionel H 2024-07-08 11:10:52 +02:00
parent 2d8a673fee
commit 0dd9e0876f

View file

@ -7,6 +7,7 @@
.ABCMeta.
__instancecheck__: (self: .ABCMeta, instance: Obj) -> Bool
__subclasscheck__: (self: .ABCMeta, subclass: Type) -> Bool
__subclasshook__: (self: .ABCMeta, subclass: Type) -> Bool
register: (self: .ABCMeta, subclass: Type) -> NoneType
.ABC: ClassType