Replies: 1 comment
-
|
Small PR submitted! 🙂 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Click to show checkboxes
First Check
Commit to Help
Example Code
I want to run a function
step_1in a moduleonein packageautoclilike this:but I can only run it with the explicit
--funcflag:$ typer --func=step_1 'autocli.one' run 123 Step 1: Processing with a=123, result=processed_123.txtFor reference the demo module is:
Description
The
maybe_update_statefunction treats the input string totyper runas a "path or module", but does not support:to also append a specific function:typer/typer/cli.py
Lines 43 to 61 in 3b17788
It could instead parse the
path_or_module:function_namesyntax by adding thismaking it
With this small change the above example would work 🎉
$ typer 'autocli.one:step_1' run 123 Step 1: Processing with a=123, result=processed_123.txt $ typer src/autocli/one.py:step_1 run 123 Step 1: Processing with a=123, result=processed_123.txtOperating System
Linux
Operating System Details
No response
Typer Version
0.16.0
Python Version
Python 3.13.3
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions