MCPcopy Create free account
hub / github.com/DasyDong/developer-roadmap / __subclasshook__

Method __subclasshook__

code/interface.py:142–147  ·  view source on GitHub ↗
(cls, subclass)

Source from the content-addressed store, hash-verified

140class FormalParserInterface(metaclass=abc.ABCMeta):
141 @classmethod
142 def __subclasshook__(cls, subclass):
143 return (hasattr(subclass, 'load_data_source') and
144 callable(subclass.load_data_source) and
145 hasattr(subclass, 'extract_text') and
146 callable(subclass.extract_text) or
147 NotImplemented)
148
149 @abc.abstractmethod
150 def load_data_source(self, path: str, file_name: str):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected