From 945f395a89cdb4e64496f8719592d5a88e1154a7 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 19 Mar 2024 14:24:01 +0100 Subject: [PATCH] rename 'get_template' to 'get_template_item' --- client/ayon_core/pipeline/anatomy/anatomy.py | 7 +++---- client/ayon_core/pipeline/anatomy/templates.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client/ayon_core/pipeline/anatomy/anatomy.py b/client/ayon_core/pipeline/anatomy/anatomy.py index 77ba83234f..4c16f20a44 100644 --- a/client/ayon_core/pipeline/anatomy/anatomy.py +++ b/client/ayon_core/pipeline/anatomy/anatomy.py @@ -99,21 +99,20 @@ class BaseAnatomy(object): """Return `AnatomyTemplates` object of current Anatomy instance.""" return self._templates_obj - def get_template(self, category_name, template_name, subkey=None): + def get_template_item(self, *args, **kwargs): """Get template item from category. Args: category_name (str): Category name. template_name (str): Template name. subkey (Optional[str]): Subkey name. + default (Any): Default value. Returns: Any: Template item, subkey value as AnatomyStringTemplate or None. """ - return self._templates_obj.get_template( - category_name, template_name, subkey - ) + return self._templates_obj.get_template_item(*args, **kwargs) def format(self, *args, **kwargs): """Wrap `format` method of Anatomy's `templates_obj`.""" diff --git a/client/ayon_core/pipeline/anatomy/templates.py b/client/ayon_core/pipeline/anatomy/templates.py index 7d9a1255a3..46cad385f0 100644 --- a/client/ayon_core/pipeline/anatomy/templates.py +++ b/client/ayon_core/pipeline/anatomy/templates.py @@ -568,7 +568,7 @@ class AnatomyTemplates: """ return self.format(in_data, strict=False) - def get_template( + def get_template_item( self, category_name, template_name, subkey=None, default=_PLACEHOLDER ): """Get template item from category.