From 513d402fc487403dd960f9619759d60679d8a69b Mon Sep 17 00:00:00 2001 From: Alex Gerveshi <15710060+agerveshi@users.noreply.github.com> Date: Tue, 19 Sep 2023 17:39:52 +0000 Subject: [PATCH] Cleanup Signed-off-by: Alex Gerveshi <15710060+agerveshi@users.noreply.github.com> --- src/deadline/nuke_submitter/assets.py | 3 +-- .../nuke_submitter/job_bundle_output_test_runner.py | 5 +---- test/deadline_submitter_for_nuke/unit/mock_stubs.py | 6 +++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/deadline/nuke_submitter/assets.py b/src/deadline/nuke_submitter/assets.py index f9f6a19..7f1aa03 100644 --- a/src/deadline/nuke_submitter/assets.py +++ b/src/deadline/nuke_submitter/assets.py @@ -7,7 +7,6 @@ from collections.abc import Generator from os.path import commonpath, dirname, join, normpath, samefile from sys import platform -from typing import List import nuke import PyOpenColorIO as OCIO @@ -47,7 +46,7 @@ def get_custom_ocio_config_path() -> str: return nuke.root().knob("customOCIOConfigPath").getEvaluatedValue() -def get_custom_ocio_config_search_paths(ocio_config_file: str) -> List[str]: +def get_custom_ocio_config_search_paths(ocio_config_file: str) -> list[str]: """Returns the directories containing the LUTs for the provided OCIO config""" ocio_config = OCIO.Config.CreateFromFile(ocio_config_file) diff --git a/src/deadline/nuke_submitter/job_bundle_output_test_runner.py b/src/deadline/nuke_submitter/job_bundle_output_test_runner.py index bbb910c..aac3c06 100644 --- a/src/deadline/nuke_submitter/job_bundle_output_test_runner.py +++ b/src/deadline/nuke_submitter/job_bundle_output_test_runner.py @@ -217,10 +217,7 @@ def _run_job_bundle_output_test(test_dir: str, dcc_scene_file: str, report_fh, m # Close the DCC scene file _close_dcc_scene_file() - # Process every file in the job bundle to replace the temp dir with a standardized path. - # Also replace the nuke version in the test job bundle with the nuke version in the - # expected job bundle (if there is one). This allows job bundle tests to be run from - # different nuke versions than they were created with. + # Process every file in the job bundle to replace the temp dir with a standardized path for filename in os.listdir(temp_job_bundle_dir): full_filename = os.path.join(temp_job_bundle_dir, filename) with open(full_filename, encoding="utf8") as f: diff --git a/test/deadline_submitter_for_nuke/unit/mock_stubs.py b/test/deadline_submitter_for_nuke/unit/mock_stubs.py index 6233b2e..7d71bd2 100644 --- a/test/deadline_submitter_for_nuke/unit/mock_stubs.py +++ b/test/deadline_submitter_for_nuke/unit/mock_stubs.py @@ -1,6 +1,6 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -from typing import List +from __future__ import annotations class MockOCIOConfig: @@ -8,8 +8,8 @@ class MockOCIOConfig: __name__ = "Config" - def __init__(self, search_paths: List[str]): + def __init__(self, search_paths: list[str]): self._search_paths = search_paths - def getSearchPaths(self) -> List[str]: + def getSearchPaths(self) -> list[str]: return self._search_paths