Skip to content

subtitles.*: fix stubtest errors - #2458

Merged
WyattBlue merged 1 commit into
PyAV-Org:masterfrom
jorenham:typing/subtitles/stubtest-fixes
Oct 22, 2026
Merged

WyattBlue merged 1 commit into
PyAV-Org:masterfrom
jorenham:typing/subtitles/stubtest-fixes

Conversation

@jorenham

Copy link
Copy Markdown
Contributor

This fixes the following stubtest errors:

av.subtitles.stream.SubtitleStream cannot be subclassed at runtime, but isn't marked with @final in the stub
av.subtitles.stream.SubtitleStream.decode2 is not present at runtime

av.subtitles.subtitle.AssSubtitle cannot be subclassed at runtime, but isn't marked with @final in the stub
av.subtitles.subtitle.BitmapSubtitle cannot be subclassed at runtime, but isn't marked with @final in the stub
av.subtitles.subtitle.BitmapSubtitle is a disjoint base at runtime, but isn't marked with @disjoint_base in the stub
av.subtitles.subtitle.BitmapSubtitlePlane cannot be subclassed at runtime, but isn't marked with @final in the stub
av.subtitles.subtitle.BitmapSubtitlePlane is a disjoint base at runtime, but isn't marked with @disjoint_base in the stub
av.subtitles.subtitle.Subtitle is a disjoint base at runtime, but isn't marked with @disjoint_base in the stub
av.subtitles.subtitle.SubtitleProxy is not present in stub
av.subtitles.subtitle.SubtitleSet cannot be subclassed at runtime, but isn't marked with @final in the stub
av.subtitles.subtitle.SubtitleSet is a disjoint base at runtime, but isn't marked with @disjoint_base in the stub
av.subtitles.subtitle.SubtitleSet.__getitem__ is inconsistent, stub parameter "i" should be positional-only (add "/", e.g. "key, /")

One stubtest error I left unresolved, because this decode2 method appears to actually be used in the tests:

av.subtitles.stream.SubtitleStream.decode2 is not present at runtime

@jorenham
jorenham force-pushed the typing/subtitles/stubtest-fixes branch from ae7056a to 10ab3f1 Compare October 21, 2026 23:41
@WyattBlue
WyattBlue merged commit f537675 into PyAV-Org:master Oct 22, 2026
1 check passed
@jorenham
jorenham deleted the typing/subtitles/stubtest-fixes branch October 22, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants