Skip to content

Commit 100d5e9

Browse files
committed
generalized params container types
1 parent f7af7d1 commit 100d5e9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

luxonis_ml/typing.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from collections.abc import Iterable
1+
from collections.abc import Iterable, Mapping, Sequence
22
from pathlib import Path, PurePosixPath
33
from typing import TYPE_CHECKING, Any, Literal, TypeAlias, TypeGuard, TypeVar
44

@@ -54,7 +54,9 @@
5454
# To avoid infinite recursion
5555
if TYPE_CHECKING: # pragma: no cover
5656
ParamValue: TypeAlias = (
57-
dict[PrimitiveType, "ParamValue"] | list["ParamValue"] | PrimitiveType
57+
Mapping[PrimitiveType, "ParamValue"]
58+
| Sequence["ParamValue"]
59+
| PrimitiveType
5860
)
5961
else:
6062
ParamValue: TypeAlias = Any

0 commit comments

Comments
 (0)