Thanks to visit codestin.com
Credit goes to github.com

Skip to content

plugin: add missing typing info#6822

Merged
bastimeyer merged 6 commits into
streamlink:masterfrom
bastimeyer:plugin/missing-typing
Feb 11, 2026
Merged

plugin: add missing typing info#6822
bastimeyer merged 6 commits into
streamlink:masterfrom
bastimeyer:plugin/missing-typing

Conversation

@bastimeyer

Copy link
Copy Markdown
Member

This adds missing typing info to various Plugin methods and utility functions, with additional typing fixes in a few plugin implementations. It also turns Plugin into an abstract base class with _get_streams() now being an abstract method.

The second to last commit fully type-annotates Plugin.streams(). This required a tiny bit of refactoring. The duplicate isinstance runtime checks are due to ty's type narrowing, which unlike mypy, makes additional assumptions about potential type inheritence.

https://docs.astral.sh/ty/reference/typing-faq/#what-is-toplistunknown-and-why-does-it-appear
https://docs.astral.sh/ty/features/type-system/#top-and-bottom-materializations

@bastimeyer bastimeyer changed the title plugin: add missing stream_weight typing info plugin: add missing typing info Feb 11, 2026
@bastimeyer bastimeyer force-pushed the plugin/missing-typing branch 2 times, most recently from ca12083 to a8ae9dd Compare February 11, 2026 19:03
@bastimeyer bastimeyer force-pushed the plugin/missing-typing branch from a8ae9dd to 267ad2b Compare February 11, 2026 19:06
@bastimeyer bastimeyer merged commit c9407c5 into streamlink:master Feb 11, 2026
18 checks passed
@bastimeyer bastimeyer deleted the plugin/missing-typing branch February 11, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant