Draft
Conversation
Contributor
📝 Docs previewLast commit 4c894e5 at: https://6671d306.typertiangolo.pages.dev |
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.
Continue work from #1525, #1601 and #1680, vendoring Click.
This PR does a few things at once:
coloramaas dependency for Windows. It's in fact already pulled in by pytest anyway, but I figured explicit is better.It's big to review, but all edits should be relatively trivial. The diff can be reviewed as one (instead of per-commit), as almost all edits should be pretty local and no code has been moved around.
Removed stuff
Sebastián: if there's anything in the list below that we do want to keep as functionality, let me know, then I'll write additional unit tests instead of removing the relevant code.
UNSET(originally introduced in this PR). Typer has its ownDefault(...)to cover these use-cases.FLAG_NEEDS_VALUE,__debug__statements,batch(),protected_args,Parameter.deprecated_click.Command,_click.Parameterand_click.ShellCompleteabstractfrom __future__ import annotations, import directly fromtypingandcollections, remove usage ofgettext, use f-stringsThis was all done 100% manually.
Added tests
Added coverage for:
_click.types.py&typer._types.py:reprfunctions mostly added to existing type tutorial testsconvertfunctions into cftests/test_type_conversion.pyshell_completionfunctionality intotest_completiondirtests/test_types.py,tests/test_types_files.pyThis was done with AI assistance, micromanaged & thoroughly reviewed by me.
Coverage stats
This branch, before this PR:
This branch, after "cleaning" the original Click files: