Skip to content

fix(cli): replace undefined 'typer' references with 'click' in MCP error handler#19

Closed
Coding-Dev-Tools wants to merge 1 commit into
mainfrom
Openclaw/deploydiff/fix-typer-nameerror-in-mcp
Closed

fix(cli): replace undefined 'typer' references with 'click' in MCP error handler#19
Coding-Dev-Tools wants to merge 1 commit into
mainfrom
Openclaw/deploydiff/fix-typer-nameerror-in-mcp

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

The mcp() command referenced typer.echo and typer.Exit but never
imported typer. This caused a NameError when click-to-mcp was not
installed, masking the helpful install instruction. Since the
project uses Click (not Typer), switched to click.echo and click.Exit.

Fixes:

  • F821: Undefined name 'typer' → use click.echo / click.Exit
  • B904: raise from None to suppress exception chain
  • I001: auto-fixed import sort in _render_costs

…ror handler

The mcp() command referenced typer.echo and typer.Exit but never
imported typer. This caused a NameError when click-to-mcp was not
installed, masking the helpful install instruction. Since the
project uses Click (not Typer), switched to click.echo and click.Exit.

Fixes:
- F821: Undefined name 'typer' → use click.echo / click.Exit
- B904: raise from None to suppress exception chain
- I001: auto-fixed import sort in _render_costs
@Coding-Dev-Tools

Copy link
Copy Markdown
Owner Author

Changes already merged into main. The typer→click fix was already applied (using print/SystemExit instead of click.echo/click.Exit). Closing as superseded.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant