From 5d73b318ec5807c170653bee914959de27e13e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Je=C5=BEek?= Date: Thu, 9 Jan 2025 14:13:24 +0100 Subject: [PATCH] Refactor type hints in validation functions - Removed type hints for `Any` in function definitions. - Simplified the `validate_otio_clip` and `process` methods across multiple classes. - Cleaned up code for better readability without changing functionality. --- .../plugins/publish/collect_otio_frame_ranges.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/client/ayon_core/plugins/publish/collect_otio_frame_ranges.py b/client/ayon_core/plugins/publish/collect_otio_frame_ranges.py index 3cf9a5b40c..7c31b6445a 100644 --- a/client/ayon_core/plugins/publish/collect_otio_frame_ranges.py +++ b/client/ayon_core/plugins/publish/collect_otio_frame_ranges.py @@ -7,7 +7,6 @@ This module contains three plugins: """ from pprint import pformat -from typing import Any import pyblish.api @@ -23,7 +22,7 @@ from ayon_core.pipeline.editorial import ( ) -def validate_otio_clip(instance: Any, logger: Any) -> bool: +def validate_otio_clip(instance, logger): """Validate if instance has required OTIO clip data. Args: @@ -62,7 +61,7 @@ class CollectOtioFrameRanges(pyblish.api.InstancePlugin): families = ["shot", "clip"] hosts = ["resolve", "hiero", "flame", "traypublisher"] - def process(self, instance: Any) -> None: + def process(self, instance): """Process the instance to collect frame ranges. Args: @@ -120,7 +119,7 @@ class CollectOtioSourceRanges(pyblish.api.InstancePlugin): families = ["shot", "clip"] hosts = ["hiero", "flame"] - def process(self, instance: Any) -> None: + def process(self, instance): """Process the instance to collect source frame ranges. Args: @@ -176,7 +175,7 @@ class CollectOtioRetimedRanges(pyblish.api.InstancePlugin): families = ["shot", "clip"] hosts = ["hiero", "flame"] - def process(self, instance: Any) -> None: + def process(self, instance): """Process the instance to handle retimed clips. Args: