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
Usage: test.py [Options]
Options:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/kolia/git/sandbox/src/test.py", line 14, in <module>
main()
File "/home/kolia/git/sandbox/src/test.py", line 10, in main
print(parse(Arguments))
^^^^^^^^^^^^^^^^
File "/home/kolia/.cache/pypoetry/virtualenvs/sandbox-y84fort7-py3.11/lib/python3.11/site-packages/clipstick/_clipstick.py", line 45, in parse
success, idx = root_node.match(0, args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kolia/.cache/pypoetry/virtualenvs/sandbox-y84fort7-py3.11/lib/python3.11/site-packages/clipstick/_tokens.py", line 501, in match
_help.help(self)
File "/home/kolia/.cache/pypoetry/virtualenvs/sandbox-y84fort7-py3.11/lib/python3.11/site-packages/clipstick/_help.py", line 99, in help
tbl.add_row("", *_help_from_token(kwarg.help()))
^^^^^^^^^^^^
File "/home/kolia/.cache/pypoetry/virtualenvs/sandbox-y84fort7-py3.11/lib/python3.11/site-packages/clipstick/_tokens.py", line 182, in help
"type": self.field_info.annotation.__name__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'types.UnionType' object has no attribute '__name__'. Did you mean: '__ne__'?
The text was updated successfully, but these errors were encountered:
Hi @sander76, I'am trying clipstick for the first time. Love the feeling, elegant & minimal. I take my 🎩 off!
The issue I am facing, I don't recall seeing in the docs, how do I handle the optional argument if the default value is
None
.With good old argparse I'd write
effective type of
args.effort
would be int | NoneWith
clipstick
I dopython -m test -h
Parsing fails with following output
The text was updated successfully, but these errors were encountered: