-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add support for Typer #14
base: main
Are you sure you want to change the base?
Conversation
trogon/trogon.py
Outdated
@@ -23,6 +23,7 @@ | |||
Footer, | |||
) | |||
from textual.widgets.tree import TreeNode | |||
import typer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to force a dependancy on typer, for those who just want to use click...
b05c7fe
to
49e8807
Compare
Removed the dependency requirement on typer and created an extra for it. This pattern of I'm weighing the benefits of being able to add this to a single command in typer, as the pattern set out in the docs would be to create a nested app for that. |
README.md
Outdated
2. Add the `tui` decorator above your typer app. e.g. | ||
```python | ||
cli = typer.Typer(...) | ||
init_tui(cli) | ||
``` | ||
3. Your click app will have a new `tui` command available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this needs some work - it still talks about Click and decorators etc.
Fix the description for Typer support. Signed-off-by: Michael Gielda <[email protected]>
Hi @darrenburns - I made a PR against @evanmags' branch fixing the docs. When he merges that, your review will be included; is there anything else that needs to be done to make this land? |
Hey @willmcgugan, You don't have a CONTRIBUTING.md on this repo, so I'm not sure if/how I can contribute to this, but these are the changes I made on my fork to get Trogon working in my Typer app. I have a few TODOs below but would like your input for desired usage and best practice. Thank you 馃檹
TODO: