From ed148c7c1135145d8b855e2f475e239d1de12c4a Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 30 Mar 2021 19:51:09 +0200 Subject: [PATCH] renamed ApplicationTool to EnvironmentTool and changed what data holds --- pype/lib/applications.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pype/lib/applications.py b/pype/lib/applications.py index 56432ec357..5b0e61b909 100644 --- a/pype/lib/applications.py +++ b/pype/lib/applications.py @@ -354,23 +354,29 @@ class EnvironmentToolGroup: return copy.deepcopy(self._environment) -class ApplicationTool: +class EnvironmentTool: """Hold information about application tool. Structure of tool information. Args: - tool_name (str): Name of the tool. - group_name (str): Name of group which wraps tool. + name (str): Name of the tool. + environment (dict): Variant environments. + group (str): Name of group which wraps tool. """ - def __init__(self, tool_name, group_name): - self.name = tool_name - self.group_name = group_name + def __init__(self, name, environment, group): + self.name = name + self.group = group + self._environment = environment + self.full_name = "/".join((group.name, name)) + + def __repr__(self): + return "<{}> - {}".format(self.__class__.__name__, self.full_name) @property - def full_name(self): - return "/".join((self.group_name, self.name)) + def environment(self): + return copy.deepcopy(self._environment) class ApplicationExecutable: