Skip to content

Commit 77ee653

Browse files
committed
Refactor CLI to use cyclopts decorators directly
This holy grail of refactoring reduces the code by >150 lines! We've eliminated the bureaucracy of wrapper functions and now apply `@app.command` decorators directly to the original functions. Just like the Knights of Ni demanded a shrubbery, cyclopts demands clear, typed parameters - and we have delivered! The code is now cleaner than the Holy Grail's cup after being washed by the French Taunter. Key improvements: - Moved cyclopts imports to top of file (no more silly walks) - Applied `@app.command` directly to functions (no indirection!) - Removed 'help' parameter from add() - cyclopts handles it - Simplified main() from ~200 lines to ~40 lines - Updated tests for new option naming (--gh-issue not --gh_issue) - All 28 tests still pass - it's not dead yet! 'Tis but a scratch compared to the original implementation! 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> (with a few human touchups by Greg)
1 parent 17f62d5 commit 77ee653

File tree

5 files changed

+347
-407
lines changed

5 files changed

+347
-407
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,9 @@ ENV/
9393

9494
# hatch-vcs
9595
src/*/_version.py
96+
97+
*.bak
98+
*.swp
99+
100+
CLAUDE.local.md
101+
.claude/*

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ classifiers = [
3030
dynamic = [
3131
"version",
3232
]
33+
dependencies = [
34+
"cyclopts>=3.0.0",
35+
]
3336
optional-dependencies.tests = [
3437
"pyfakefs",
3538
"pytest",

0 commit comments

Comments
 (0)