opencv/sdk: fix typing.Union missing

This commit is contained in:
Koushik Dutta
2023-04-24 09:26:21 -07:00
parent 21f8239db7
commit 9331b71433
6 changed files with 11 additions and 13 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/opencv",
"version": "0.0.76",
"version": "0.0.79",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/opencv",
"version": "0.0.76",
"version": "0.0.79",
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
}

View File

@@ -36,5 +36,5 @@
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
},
"version": "0.0.76"
"version": "0.0.79"
}

View File

@@ -1,11 +1,10 @@
from __future__ import annotations
from enum import Enum
try:
from typing import TypedDict, Union
from typing import TypedDict
except:
from typing_extensions import TypedDict, Union
from typing import Any
from typing import Callable
from typing_extensions import TypedDict
from typing import Union, Any, Callable
from .other import *

View File

@@ -267,11 +267,10 @@ class ${td.name}(TypedDict):
const pythonTypes = `from __future__ import annotations
from enum import Enum
try:
from typing import TypedDict, Union
from typing import TypedDict
except:
from typing_extensions import TypedDict, Union
from typing import Any
from typing import Callable
from typing_extensions import TypedDict
from typing import Union, Any, Callable
from .other import *

View File

@@ -1330,7 +1330,7 @@ export interface ObjectDetectionZone {
* E.g. TensorFlow, OpenCV, or a Coral TPU.
*/
export interface ObjectDetection {
generateObjectDetections(videoFrames: AsyncGenerator<VideoFrame & MediaObject>, session: ObjectDetectionGeneratorSession): Promise<AsyncGenerator<ObjectDetectionGeneratorResult>>;
generateObjectDetections(videoFrames: AsyncGenerator<VideoFrame & MediaObject, void>, session: ObjectDetectionGeneratorSession): Promise<AsyncGenerator<ObjectDetectionGeneratorResult, void>>;
detectObjects(mediaObject: MediaObject, session?: ObjectDetectionSession): Promise<ObjectsDetected>;
getDetectionModel(settings?: { [key: string]: any }): Promise<ObjectDetectionModel>;
}