Skip to content

Commit f5efbca

Browse files
committed
Fix python 3.9 typing
1 parent 70bc1dd commit f5efbca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

linuxpy/video/device.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
)
3131
from linuxpy.io import IO
3232
from linuxpy.ioctl import ioctl
33-
from linuxpy.types import AsyncIterator, Buffer, Callable, Iterable, Iterator, Optional, PathLike, Self
33+
from linuxpy.types import AsyncIterator, Buffer, Callable, Iterable, Iterator, Optional, PathLike, Self, Union
3434
from linuxpy.util import astream, bit_indexes, make_find
3535

3636
from . import raw
@@ -475,7 +475,7 @@ def get_raw_format(fd, buffer_type) -> raw.v4l2_format:
475475
return fmt
476476

477477

478-
def get_format(fd, buffer_type) -> Format | MetaFormat:
478+
def get_format(fd, buffer_type) -> Union[Format, MetaFormat]:
479479
f = get_raw_format(fd, buffer_type)
480480
if buffer_type in {BufferType.META_CAPTURE, BufferType.META_OUTPUT}:
481481
return MetaFormat(

0 commit comments

Comments
 (0)