Skip to content

fix(cli): enable CLI import and output without real click installed - #252

Merged
luk384090-cloud merged 2 commits into
mainfrom
dev/2.1.3-1
Dec 1, 2026
Merged

luk384090-cloud merged 2 commits into
mainfrom
dev/2.1.3-1

Conversation

@luk384090-cloud

Copy link
Copy Markdown
Collaborator
  • Modify errors.py to import click conditionally to prevent import errors
  • Handle absence of click gracefully by setting exception classes accordingly
  • Switch output.py from using click.echo to typer.echo for consistent output
  • Ensure JSON, NDJSON, and YAML outputs are emitted via typer to avoid wrapping issues
  • Add tests to verify CLI modules load and operate correctly without click installed
  • Tests simulate click-less environment by blocking click imports in subprocesses

Description

[Describe what this PR does and why]

Related Issue: Fixes #[issue_number] or Relates to #[issue_number]

Security Considerations: [Check if API keys or sensitive credentials are exposed in code/logs]

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Model
  • Application
  • Common
  • Documentation
  • Tests
  • CI/CD

Checklist

  • Pre-commit hooks pass
  • Tests pass locally
  • Documentation updated (if needed)
  • Ready for review

Testing

[How to test these changes]

Additional Notes

[Optional: any other context]

luk384090-cloud added 2 commits December 1, 2026 11:59
- Modify errors.py to import click conditionally to prevent import errors
- Handle absence of click gracefully by setting exception classes accordingly
- Switch output.py from using click.echo to typer.echo for consistent output
- Ensure JSON, NDJSON, and YAML outputs are emitted via typer to avoid wrapping issues
- Add tests to verify CLI modules load and operate correctly without click installed
- Tests simulate click-less environment by blocking click imports in subprocesses
@luk384090-cloud
luk384090-cloud merged commit 1bd6a88 into main Dec 1, 2026
11 checks passed
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