GeezerVison is showing github.com — `ParamType` and other typing improvements by kdeldycke · Pull Request #3371 · pallets/click
Conversation
kdeldycke
commented
Apr 22, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
PR to track and study the unmerged changes from @AndreasBackx that were left in the stale typing/paramtype. See the discussion at https://github.com/pallets/click/discussions/3329 for context.
I was able to salvage and rebase on top of stable the majority of the initial changes like:
- making
ParamType a generic ABC and introducing ParamTypeInfoDict
- adding
ParamTypeInfoDict
- updating
FuncParamType to a generic
- narrowing of
convert() return types
CompositeParamType generic with abstract arity
Stuff that were made obsolete from PRs merged upstream since the last commit in 2024:
Other stuff that I skipped as too strict:
_compat.py t.Any to t.AnyStr
File generic with t.AnyStr
_is_file_like with t.AnyStr
I also extracted from the original typing/paramtype the refactor of convert_type which is not strictly related to typing improvements and live in its own PR for later evaluation at: #3372
Related to #2805
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably update the example in the docs as well: https://click.palletsprojects.com/en/stable/parameter-types/. Maybe also inline the version updates in the docs.
Approving as this is already an improvement and I don't see any regressions from popping up, besides perhaps the tuple type checking?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks @AndreasBackx for reviewing your own code and the approval! 😎 Unless you find some quick win to add, I propose to consider this PR ready for final review/merge.
Again, the main objective here is to clear the backlog of PRs and close global branches like typing/paramtype.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
kdeldycke
added a commit
to kdeldycke/click
that referenced
this pull request
Apr 27, 2026
This is a refactor that was original part of `typing/paramtype` branch but split out of pallets#3371 to keep the latter focused on typing only.
Co-authored-by: Kevin Deldycke <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
|
Any reason @Rowlando13 that you merged into main and not stable? Anyway, thanks for the merge and removal of typing/paramtype!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
kdeldycke
added a commit
to kdeldycke/click
that referenced
this pull request
Apr 29, 2026
This is a refactor that was original part of `typing/paramtype` branch but split out of pallets#3371 to keep the latter focused on typing only.
Co-authored-by: Kevin Deldycke <[email protected]>
Any reason @Rowlando13 that you merged into main and not stable?
Just answered my question based on yesterday's activity: seems like we target main because we stated an 8.x release cycle (8.4.0 in this case), and it seems the tradition is to target stable for 8.3.x/8.4.x kind of releases.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
kdeldycke reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
davidism
Awaiting requested review from davidism
Rowlando13
Awaiting requested review from Rowlando13
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
typing
Type annotations and stubs
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|