Move CLI deps (typer, rich) to optional [cli] extra#42
Merged
Conversation
SDK-only consumers no longer pull in typer or rich, and the typer pin is bumped from <0.10 (2+ years stale) to >=0.12 so it stops conflicting with downstream packages like mcp-alchemy. Running the `taskbadger` CLI without the extra installed now prints a friendly install hint instead of an ImportError. Also handle modern typer/click passing empty list options as None. Bump pre-commit's pinned default Python from 3.11 to 3.12 so contributors without 3.11 installed locally can still run hooks. Closes #41 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
typer[all] <0.10.0from core dependencies; SDK-only users (pip install taskbadger) no longer pull typer or rich[cli]optional extra (typer >=0.12,rich >=13.0) — install withpip install 'taskbadger[cli]'cli_main.pynow exits with a friendly install hint if typer/rich are missing instead of raising ImportError--tag/--metadatalist options asNonedefault_language_versionin pre-commit to python3.12 (3.11 was no longer broadly installed)Closes #41 — the old
typer[all] <0.10.0pin was over two years stale and conflicted with downstream packages (e.g.mcp-alchemy) that need a newer typer.Test plan
uv run pytest -v— all CLI tests pass against typer 0.19.2 (one pre-existing flake intest_celery::test_task_mapis unrelated; passes in isolation)import taskbadgerworks without typer installedtaskbadgerscript prints the friendly install message when typer is unavailable🤖 Generated with Claude Code