From 406f43a13f2ac075c45605beebb4c1f3708fd335 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Tue, 3 Jun 2025 12:10:26 +0200 Subject: [PATCH] formatting cleanup --- client/ayon_core/host/host.py | 4 ++-- client/ayon_core/host/interfaces/workfiles.py | 3 --- client/ayon_core/pipeline/workfile/utils.py | 6 +++--- client/ayon_core/tools/workfiles/models/workfiles.py | 2 -- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/client/ayon_core/host/host.py b/client/ayon_core/host/host.py index d451b768c1..5e5e8ac79f 100644 --- a/client/ayon_core/host/host.py +++ b/client/ayon_core/host/host.py @@ -347,8 +347,8 @@ class HostBase(ABC): "AYON_WORKDIR": workdir, } - # Update the Session and environments. Pop from environments all keys with - # value set to None. + # Update the Session and environments. Pop from environments all + # keys with value set to None. for key, value in envs.items(): if value is None: os.environ.pop(key, None) diff --git a/client/ayon_core/host/interfaces/workfiles.py b/client/ayon_core/host/interfaces/workfiles.py index 0c8ceb872b..47a0cb0277 100644 --- a/client/ayon_core/host/interfaces/workfiles.py +++ b/client/ayon_core/host/interfaces/workfiles.py @@ -368,8 +368,6 @@ class IWorkfileHost: """ context = self.get_current_context() project_name = context["project_name"] - current_folder_path = context["folder_path"] - current_task_name = context["task_name"] workdir = os.path.dirname(filepath) # Set 'AYON_WORKDIR' environment variable @@ -1033,7 +1031,6 @@ class IWorkfileHost: """ pass - def _before_workfile_save( self, filepath: str, diff --git a/client/ayon_core/pipeline/workfile/utils.py b/client/ayon_core/pipeline/workfile/utils.py index 7ed2ee4739..c45163e7a1 100644 --- a/client/ayon_core/pipeline/workfile/utils.py +++ b/client/ayon_core/pipeline/workfile/utils.py @@ -8,7 +8,7 @@ from typing import Optional, Any import ayon_api from ayon_api.operations import OperationsSession -from ayon_core.lib import filter_profiles, emit_event, get_ayon_username +from ayon_core.lib import filter_profiles, get_ayon_username from ayon_core.settings import get_project_settings from .path_resolving import get_workfile_template_key @@ -54,7 +54,7 @@ def get_workfiles_info( task_ids=[task_id], )) - if platform.system().lower() == "windows": + if platform.system().lower() == "windows": workfile_path = workfile_path.replace("\\", "/") workfile_path = workfile_path.lower() @@ -398,7 +398,7 @@ def copy_and_open_workfile( """ from ayon_core.pipeline.context_tools import registered_host - + host = registered_host() host.copy_workfile( src_workfile_path, diff --git a/client/ayon_core/tools/workfiles/models/workfiles.py b/client/ayon_core/tools/workfiles/models/workfiles.py index f2977be973..23521dc3f6 100644 --- a/client/ayon_core/tools/workfiles/models/workfiles.py +++ b/client/ayon_core/tools/workfiles/models/workfiles.py @@ -1,13 +1,11 @@ from __future__ import annotations import os import copy -import uuid import platform import typing from typing import Optional, Any import ayon_api -from ayon_api.operations import OperationsSession from ayon_core.lib import ( get_ayon_username,