refactor: remove unused OptionHelpExtra TypedDict from _click.types - #1938
Closed
noQbot wants to merge 1 commit into
Closed
refactor: remove unused OptionHelpExtra TypedDict from _click.types#1938noQbot wants to merge 1 commit into
noQbot wants to merge 1 commit into
Conversation
OptionHelpExtra (vendored from Click 8.3.1) annotates the return of Option.get_help_extra(), a method Typer's vendored _click never included. It is referenced nowhere in the codebase and is not part of any public API surface. Removing it and its now-unused TypedDict import. No runtime or public-API change. Co-Authored-By: Vinv-AI <309466812+Vinv-AI@users.noreply.github.com>
svlandeg
reviewed
Aug 24, 2026
svlandeg
left a comment
Member
There was a problem hiding this comment.
Closing, violates the guidelines on user contributions.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Discussion: #1937
Description
OptionHelpExtraintyper/_click/types.pyis aTypedDictvendored fromClick 8.3.1. In Click it annotates the return value of
Option.get_help_extra().Typer's vendored
_clicknever included that method, and Typer's own help-recordassembly (
typer/core.py) does not use the type. As a resultOptionHelpExtrais referenced nowhere in the codebase and is not part of any public API surface:
it lives in the private
typer/_clickpackage and is not re-exported bytyper/__init__.pyortyper/_click/__init__.py.This PR:
OptionHelpExtraTypedDict.TypedDictimport fromtyper/_click/types.py.No runtime behavior or public-API change. If Typer later re-vendors Click's
get_help_extra()path, the type can be reintroduced alongside its caller.AI Disclaimer
Models: Composer 2.5 (via Cursor + VinvAI )
Prompt (paraphrased): act on Vinv's dead-code finding for
OptionHelpExtra—confirm the symbol is genuinely unreferenced (no static references, no
re-export from any package
__init__or public API surface, no dynamic lookupby name, and no
get_help_extracaller in Typer's vendored_click), thendelete it along with any now-unused imports or types that existed solely to
support it.
AI transcript
OptionHelpExtraintyper/_click/types.pyas unreferenced; the removal was implemented via Composer 2.5 (Cursor + VinvAI).
OptionHelpExtra→ only the definition site matched.get_help_extra(the method it annotates in upstream Click) doesnot exist anywhere in Typer's vendored
_click.typer/__init__.py,typer/_click/__init__.py,__all__) and not resolved dynamically.TypedDictimport had no other users.OptionHelpExtraand the now-unusedTypedDictimport.python -m py_compile typer/_click/types.py→ compiles clean. (Fullpytest/coverage suite not run in this session.)
Checklist