ParamType and other typing improvements#3371
Conversation
bbf4257 to
ffe4a45
Compare
Co-authored-by: Kevin Deldycke <kevin@deldycke.com>
ffe4a45 to
5989375
Compare
AndreasBackx
left a comment
There was a problem hiding this comment.
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?
Refs: #3371 (comment) Co-authored-by: Kevin Deldycke <kevin@deldycke.com>
8e19856 to
6e981ed
Compare
Just updated the docs at: ded5b69 |
|
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 |
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 <kevin@deldycke.com>
|
Any reason @Rowlando13 that you merged into |
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 <kevin@deldycke.com>
Just answered my question based on yesterday's activity: seems like we target |
|
Yep |
PR to track and study the unmerged changes from @AndreasBackx that were left in the stale
typing/paramtype. See the discussion at #3329 for context.I was able to salvage and rebase on top of
stablethe majority of the initial changes like:ParamTypea generic ABC and introducingParamTypeInfoDictParamTypeInfoDictFuncParamTypeto a genericconvert()return typesCompositeParamTypegeneric with abstractarityStuff that were made obsolete from PRs merged upstream since the last commit in 2024:
BoolParamType: rewritten in Fix reconciliation of envvar withdefault,flag_valueandtypeparameters for flag options #2956Choicenormalization: already part of ExpandChoicetoken normalization + make generic #2796Filedocstring: already cleaned up in Break up arguments section #2586Other stuff that I skipped as too strict:
_compat.pyt.Anytot.AnyStrFilegeneric witht.AnyStr_is_file_likewitht.AnyStrI also extracted from the original
typing/paramtypethe refactor ofconvert_typewhich is not strictly related to typing improvements and live in its own PR for later evaluation at: #3372Related to #2805