|
6 | 6 | import warnings
|
7 | 7 | from subprocess import PIPE, Popen
|
8 | 8 | from tempfile import NamedTemporaryFile
|
9 |
| -from typing import Self, TypedDict |
| 9 | +from typing import TypedDict, Optional |
10 | 10 |
|
11 | 11 | import vapoursynth as vs
|
12 | 12 | from vstools.stgpytools import CustomValueError, DependencyNotFoundError, FuncExceptT, SPath, SPathLike
|
@@ -48,7 +48,7 @@ class VideoPackets(list[int]):
|
48 | 48 | def from_video(
|
49 | 49 | cls, src_file: SPathLike, out_file: SPathLike | None = None,
|
50 | 50 | offset: int = 0, *, func: FuncExceptT | None = None
|
51 |
| - ) -> Self: |
| 51 | + ) -> "VideoPackets": |
52 | 52 | """
|
53 | 53 | Obtain packet sizes from a video file.
|
54 | 54 |
|
@@ -128,7 +128,7 @@ def from_video(
|
128 | 128 | return cls(pkt_sizes)
|
129 | 129 |
|
130 | 130 | @classmethod
|
131 |
| - def from_file(cls, file: SPathLike, *, func: FuncExceptT | None = None) -> Self | None: |
| 131 | + def from_file(cls, file: SPathLike, *, func: FuncExceptT | None = None) -> Optional["VideoPackets"]: |
132 | 132 | """
|
133 | 133 | Obtain packet sizes from a given file.
|
134 | 134 |
|
@@ -156,7 +156,7 @@ def from_clip(
|
156 | 156 | cls, clip: vs.VideoNode,
|
157 | 157 | out_file: SPathLike, src_file: SPathLike | None = None,
|
158 | 158 | offset: int = 0, *, func: FuncExceptT | None = None
|
159 |
| - ) -> Self: |
| 159 | + ) -> "VideoPackets": |
160 | 160 | """
|
161 | 161 | Obtain packet sizes from a given clip.
|
162 | 162 |
|
|
0 commit comments