From 2d62944ac15b46dc5ef49312ee4863602d593e2e Mon Sep 17 00:00:00 2001 From: Brett Jia Date: Sun, 6 Aug 2023 12:54:08 -0400 Subject: [PATCH] python-codecs: make annotations compatible to pre-3.10 (#1000) --- plugins/python-codecs/src/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/python-codecs/src/main.py b/plugins/python-codecs/src/main.py index 6f649f372..229d8410e 100644 --- a/plugins/python-codecs/src/main.py +++ b/plugins/python-codecs/src/main.py @@ -2,7 +2,7 @@ import traceback import asyncio import scrypted_sdk from scrypted_sdk import Setting, SettingValue -from typing import Any, List +from typing import Any, List, Union import gstreamer import libav import vipsimage @@ -24,7 +24,7 @@ except: class LibavGenerator(scrypted_sdk.ScryptedDeviceBase, scrypted_sdk.VideoFrameGenerator): - def __init__(self, nativeId: str | None, z): + def __init__(self, nativeId: Union[str, None], z): super().__init__(nativeId) self.zygote = z @@ -43,7 +43,7 @@ class GstreamerGenerator( scrypted_sdk.VideoFrameGenerator, scrypted_sdk.Settings, ): - def __init__(self, nativeId: str | None, z): + def __init__(self, nativeId: Union[str, None], z): super().__init__(nativeId) self.zygote = z