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

Method is_base_data_source

app/data_source/api/dynamic_loader.py:71–85  ·  view source on GitHub ↗
(class_name: str)

Source from the content-addressed store, hash-verified

69 all_classes.update(DynamicLoader.extract_classes(file_path))
70
71 def is_base_data_source(class_name: str):
72 if class_name not in all_classes:
73 return False
74
75 class_info = all_classes[class_name]
76 node = class_info['node']
77
78 for base in node.bases:
79 if isinstance(base, ast.Name):
80 if base.id == 'BaseDataSource':
81 return True
82 elif is_base_data_source(base.id):
83 return True
84
85 return False
86
87 data_sources = {}
88 # Then, check if each class inherits from BaseDataSource

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected