Skip to content

Commit 3ac964e

Browse files
committed
refactor: use internal stgpytools
1 parent bae01b7 commit 3ac964e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vstools/functions/packets.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import warnings
77
from subprocess import PIPE, Popen
88
from tempfile import NamedTemporaryFile
9-
from typing import Self, TypedDict
9+
from typing import TypedDict, Optional
1010

1111
import vapoursynth as vs
1212
from vstools.stgpytools import CustomValueError, DependencyNotFoundError, FuncExceptT, SPath, SPathLike
@@ -48,7 +48,7 @@ class VideoPackets(list[int]):
4848
def from_video(
4949
cls, src_file: SPathLike, out_file: SPathLike | None = None,
5050
offset: int = 0, *, func: FuncExceptT | None = None
51-
) -> Self:
51+
) -> "VideoPackets":
5252
"""
5353
Obtain packet sizes from a video file.
5454
@@ -128,7 +128,7 @@ def from_video(
128128
return cls(pkt_sizes)
129129

130130
@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"]:
132132
"""
133133
Obtain packet sizes from a given file.
134134
@@ -156,7 +156,7 @@ def from_clip(
156156
cls, clip: vs.VideoNode,
157157
out_file: SPathLike, src_file: SPathLike | None = None,
158158
offset: int = 0, *, func: FuncExceptT | None = None
159-
) -> Self:
159+
) -> "VideoPackets":
160160
"""
161161
Obtain packet sizes from a given clip.
162162

0 commit comments

Comments
 (0)