Closed msftcangoblowm closed 3 months ago
End users should never be presented with a traceback.
You're using the test client. You still need to pass strings, just like the command line would pass. End users wouldn't see this.
Do not make assumptions regarding the user input type. Handler should accept typing.Any
It sounds like you may have confused python typing with click param type converters.
From a shell, the click entrypoint receives strings. Didn't realize this. Actually had to confirm couldn't pass in a float value.
Thru the test client, was not aware should only be passing in str, the same as the shell
Thank you for your quick response and clear explaination
This is a working minimal unittest module demonstrating the issue. tl;dr; EPILOG_CHOKE contains the bug report
Uncomment the
assert False
to see the locals Copy+paste into integration/test_upstream_click_issue.pypython -m unittest integration.test_upstream_click_issue --locals
(The paths in the traceback has been obfusicated)
integration/test_upstream_click_issue.py