You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a follow-up to the work done on #100. This PR adds an _ai_command function that uses the arguments provided as a space-delimited list. @dlqqq writes:
It would be better to leverage argparse.add_subparser here, but that would require us to rip out the IPython decorators and create the parser object ourselves. [The IPython.core.magic_arguments module]](/~https://github.com/ipython/ipython/blob/main/IPython/core/magic_arguments.py) does not [have] a decorator for this functionality. In the long-term, it would be more robust to use argparse directly rather than relying on the intermediary layer provided by IPython.
Proposed Solution
Use argparse.add_subparser to parse arguments to %ai commands. As an alternative, consider click; argparse is somewhat notorious for changing its functionality across Python versions, so it may not be ideal for us.
The text was updated successfully, but these errors were encountered:
Problem
This is a follow-up to the work done on #100. This PR adds an
_ai_command
function that uses the arguments provided as a space-delimited list. @dlqqq writes:Proposed Solution
Use
argparse.add_subparser
to parse arguments to%ai
commands. As an alternative, considerclick
;argparse
is somewhat notorious for changing its functionality across Python versions, so it may not be ideal for us.The text was updated successfully, but these errors were encountered: