Skip to content

Merge Click and Typer functionality#1680

Open
svlandeg wants to merge 6 commits intofastapi:drop-clickfrom
svlandeg:feat/continue-vendor-v2
Open

Merge Click and Typer functionality#1680
svlandeg wants to merge 6 commits intofastapi:drop-clickfrom
svlandeg:feat/continue-vendor-v2

Conversation

@svlandeg
Copy link
Copy Markdown
Member

@svlandeg svlandeg commented Apr 7, 2026

Continue work from #1525 and #1601, vendoring Click.

Note: this PR is best reviewed commit-by-commit. I've intentionally created the commits to be self-contained and tests should past (excl coverage) after each commit. I've refrained from doing additional unnecessary edits/cleanup so that the diff would be minimal in this PR.

At several places in Typer's codebase, we override/subclass Click's behaviour. This PR simplifies the code in these cases, as we don't need to keep legacy Click code around anymore.

0% vibe-coded, 100% manually-executed refactor to (try and) ensure high quality & reduce unexpected errors.

This PR

  • Merge Path functionality from Typer & Click
  • Merge Argument functionality from Typer & Click
  • Merge Option functionality from Typer & Click
  • Remove support for unused chain from TyperOption and TyperArgument
  • Merge Group functionality from Typer & Click
  • Merge Choice functionality from Typer & Click
  • Merge ShellComplete classes from _click.shell_completion and typer._completion_classes

Follow-up work

  • Further cleanups
  • Getting Click code into Typer's formatting style
  • Removing more dead & deprecated code

Coverage stats

This branch, before this PR:

13755 statements, 1155 missing (91.6% coverage)

This branch, after this PR:

13538 statements, 1037 missing (92.3% coverage)

@svlandeg svlandeg changed the base branch from master to drop-click April 7, 2026 19:18
@svlandeg svlandeg self-assigned this Apr 7, 2026
@svlandeg svlandeg added breaking and removed breaking labels Apr 7, 2026
@svlandeg svlandeg changed the title WIP: merge Click and Typer functionality Merge Click and Typer functionality Apr 8, 2026
@svlandeg svlandeg marked this pull request as ready for review April 8, 2026 13:29
@svlandeg svlandeg removed their assignment Apr 8, 2026
Copy link
Copy Markdown

@LVT-ENG LVT-ENG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants