(file_path: str, class_name: str)
| 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): |
no outgoing calls
no test coverage detected