Skip to content

Commit 5ca0ed4

Browse files
zhujian0805claude
andcommitted
refactor: reduce cyclomatic complexity in high-CC functions
- endpoints.py: fetch_models() CC=46→7, extracted ModelCache class and 12+ helper methods for caching, parsing, and error handling - cli/commands.py: uninstall() CC=32→5, extracted UninstallContext dataclass and 8 helper functions for installation management - mcp/base_client.py: _add_server_to_config() CC=38→6, _remove_server_from_config() CC=17→5, extracted 6 module-level helper functions for config file handling - Fix test collection: add pexpect to dev deps and conditional imports Total complexity reduction: ~132 points across 4 functions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f74336b commit 5ca0ed4

7 files changed

Lines changed: 743 additions & 605 deletions

File tree

0 commit comments

Comments
 (0)