Skip to content

Remove unused Click code#1601

Open
svlandeg wants to merge 22 commits intofastapi:drop-clickfrom
svlandeg:update/vendored_click
Open

Remove unused Click code#1601
svlandeg wants to merge 22 commits intofastapi:drop-clickfrom
svlandeg:update/vendored_click

Conversation

@svlandeg
Copy link
Member

@svlandeg svlandeg commented Feb 23, 2026

Continue work from #1525, vendoring Click.

This PR removes Click code that Typer doesn't use and isn't currently documented/tested.
No Typer code is changed and no additional tests added (yet).

Removed Click's functionality:

  • CommandCollection
  • to_info_dict() funtions
  • open_file(), KeepOpenFile
  • UnprocessedParamType
  • pager, _pipepager, _tempfilepager, _nullpager, echo_via_pager
  • Editor, edit()
  • pause(), unstyle() and clear()
  • _check_nested_chain
  • _MultiCommand, _BaseCommand, _FakeSubclassCheck

All original Typer tests from the test suite continue to succeed after these edits.

Coverage stats

On current master:

9975 statements, 0 missing (100% coverage)

This branch, before this PR:

14118 statements, 1427 missing (89.9% coverage)

This branch, after this PR:

13755 statements, 1155 missing (91.6% coverage)

@svlandeg svlandeg self-assigned this Feb 23, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2026

📝 Docs preview

Last commit 7d572f2 at: https://44bba31e.typertiangolo.pages.dev

requires-dist = [
{ name = "annotated-doc", specifier = ">=0.0.2" },
{ name = "rich", specifier = ">=10.11.0" },
{ name = "rich", specifier = ">=12.3.0" },
Copy link
Member Author

@svlandeg svlandeg Feb 23, 2026

Choose a reason for hiding this comment

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

This isn't an actual edit from this PR, it's a fix from an issue with a merge conflict when I merged master into drop-click directly. master has Rich at >12.3.0.

@github-actions github-actions bot added the conflicts Automatically generated when a PR has a merge conflict label Feb 23, 2026
@github-actions

This comment was marked as resolved.

@svlandeg svlandeg changed the base branch from drop-click to master February 23, 2026 15:22
@svlandeg svlandeg changed the base branch from master to drop-click February 23, 2026 15:22
@github-actions github-actions bot removed the conflicts Automatically generated when a PR has a merge conflict label Feb 23, 2026
@svlandeg svlandeg marked this pull request as ready for review February 23, 2026 19:49
@svlandeg svlandeg removed their assignment Feb 23, 2026
@svlandeg svlandeg changed the title WIP: continue work on vendoring Click Remove unused Click code Feb 23, 2026
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.

1 participant