From 5a664ecdf923fe2f028569b1b57c6fba6e5094d0 Mon Sep 17 00:00:00 2001 From: Paul Farault Date: Fri, 24 Nov 2023 15:05:41 +0100 Subject: [PATCH] refactor: remove unused methods --- tdp/core/variables/service_variables.py | 28 ------------------------- 1 file changed, 28 deletions(-) diff --git a/tdp/core/variables/service_variables.py b/tdp/core/variables/service_variables.py index 2cb7d1c6..f9e0aa53 100644 --- a/tdp/core/variables/service_variables.py +++ b/tdp/core/variables/service_variables.py @@ -18,7 +18,6 @@ from tdp.core.variables.variables import Variables, VariablesDict if TYPE_CHECKING: - from tdp.core.dag import Dag from tdp.core.repository.repository import Repository from tdp.core.service_component_name import ServiceComponentName @@ -106,33 +105,6 @@ def get_variables(self, component_name: str) -> dict: with Variables(component_path).open("r") as variables: return variables.copy() - # TODO: move this function outside of this class, or move the dag part - def get_component_name(self, dag: Dag, component_name: str) -> str: - """Get the full component name. - - Args: - dag: Dag instance. - component_name: Name of the component. - - Returns: - _ - - Raises: - ValueError: If component does not exist. - """ - operations_filtered = list( - filter( - lambda operation: operation.component == component_name, - dag.services_operations[self.name], - ) - ) - if operations_filtered: - operation = operations_filtered[0] - return self.name + "_" + operation.component - raise ValueError( - f"Service {self.name} does not have a component {component_name}" - ) - def update_from_variables_folder( self, message: str, tdp_vars_overrides: PathLike ) -> None: