MCPcopy Create free account
hub / github.com/GerevAI/gerev / get_class

Method get_class

app/data_source/api/dynamic_loader.py:41–48  ·  view source on GitHub ↗
(file_path: str, class_name: str)

Source from the content-addressed store, hash-verified

39
40 @staticmethod
41 def get_class(file_path: str, class_name: str):
42 loader = importlib.machinery.SourceFileLoader(class_name, file_path)
43 module = loader.load_module()
44 try:
45 return getattr(module, class_name)
46 except AttributeError:
47 raise AttributeError(f"Class {class_name} not found in module {module},"
48 f"make sure you named the class correctly (it should be <Platform>DataSource)")
49
50 @staticmethod
51 def find_class_file(directory, class_name):

Callers 2

get_data_source_classMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected