FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[yt-dlp] Rename private options type by ryux1 · Pull Request #16354 · python/typeshed · GitHub

Repository navigation

[yt-dlp] Rename private options type - #16354

Merged
srittau merged 3 commits into
python:mainfrom
ryux1:ryux1/yt-dlp-public-options
Sep 11, 2026
Merged

srittau merged 3 commits into
python:mainfrom
ryux1:ryux1/yt-dlp-public-options

Conversation

ryux1 commented Sep 6, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor

Rename the type-checking-only _Params TypedDict to _YoutubeDLOptions so its role is clear while preserving the private underscore required for a symbol that does not exist at runtime.

Prepared with OpenAI Codex.

This comment has been minimized.

donbarbos commented Sep 6, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor

Thanks for contributing!
Your tests also pass on the main branch. The only change here is renaming the TypedDict, but unfortunately, there doesn't seem to be any justification for it (unless I'm missing something). _Params can also be imported.

ryux1 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

The distinction I’m addressing is public typing API rather than runtime importability. _Params can technically be imported, but its leading underscore marks it private, so recommending it in user annotations couples callers to an implementation name and can trigger private-usage diagnostics under stricter checker configurations.

The linked issue’s stored-dictionary pattern needs an explicit TypedDict annotation to retain per-key contextual types; YoutubeDLOptions provides a supported name for that annotation while preserving strict option-value checking. The added test exercises exactly that pattern.

If Typeshed’s policy is to leave this type private despite #16331, I’m happy to close this, but the rename is the intended behavioral change: making the existing option schema a public type-checking API.

This comment has been minimized.

Comment thread stubs/yt-dlp/yt_dlp/__init__.pyi Outdated
ryux1 changed the title [yt-dlp] Expose options type [yt-dlp] Rename private options type Sep 10, 2026

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

srittau merged commit 778a456 into python:main Sep 11, 2026
74 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL