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
fromtargimportCLIdefadd(a: int, b: int):
""" Add the two numbers. :param a: The first number. :param b: The second number. """print(a+b)
if__name__=="__main__":
cli=CLI()
cli.register(add)
cli.run()`
if I am running the command
python3 main.py add 3 --b=4
Output is 7.
But for this command
python3 main.py add --a=3 4
It is giving following error.
The command failed.
add() missing 1 required positional argument: 'b'
For a full stack trace, use --trace
The text was updated successfully, but these errors were encountered:
for this function
if I am running the command
Output is 7.
But for this command
It is giving following error.
The text was updated successfully, but these errors were encountered: