Skip to content

Commit 0ff2e69

Browse files
committed
Use Union instead of pipe
1 parent 591995f commit 0ff2e69

File tree

1 file changed

+2
-2
lines changed
  • src/torchcodec/decoders/_core

1 file changed

+2
-2
lines changed

src/torchcodec/decoders/_core/ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import json
1010
import warnings
1111
from types import ModuleType
12-
from typing import List, Optional, Tuple
12+
from typing import List, Optional, Tuple, Union
1313

1414
import torch
1515
from torch.library import get_ctx, register_fake
@@ -137,7 +137,7 @@ def create_from_bytes(
137137

138138

139139
def create_from_file_like(
140-
file_like: io.RawIOBase | io.BytesIO, seek_mode: Optional[str] = None
140+
file_like: Union[io.RawIOBase, io.BytesIO], seek_mode: Optional[str] = None
141141
) -> torch.Tensor:
142142
assert _pybind_ops is not None
143143
return _convert_to_tensor(_pybind_ops.create_from_file_like(file_like, seek_mode))

0 commit comments

Comments
 (0)