mirror of
https://github.com/erg-lang/erg.git
synced 2025-07-13 16:15:15 +00:00

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>
13 lines
469 B
Python
13 lines
469 B
Python
.abstractmethod: |F <: GenericCallable|(F) -> F
|
|
.abstractclassmethod: |F <: GenericCallable|(F) -> F
|
|
.abstractstaticmethod: |F <: GenericCallable|(F) -> F
|
|
|
|
.ABCMeta: ClassType
|
|
.ABCMeta <: Type
|
|
.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
|