8000 Improve typing error messages · Issue #71 · theforeman/obsah · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improve typing error messages #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ehelms opened this issue Apr 25, 2025 · 3 comments
Open

Improve typing error messages #71

ehelms opened this issue Apr 25, 2025 · 3 comments

Comments

@ehelms
Copy link
Member
ehelms commented Apr 25, 2025

The type support error messages could be more user centric and actionable. The current output:

argument --database-ssl-ca: invalid 'AbsolutePath' value: 'this-is'

I am thinking a tweak to the error message like:

argument --database-ssl-ca should be an 'AbsolutePath' on the filesystem. The value given was 'this-is'.

For choices:

argument --database-mode: expects one of {external, internal}
@ekohl
Copy link
Member
ekohl commented Apr 25, 2025

argument --database-ssl-ca should be an 'AbsolutePath' on the filesystem. The value given was 'this-is'.

Not quite IMHO because to me your message implies it must exist on the filesystem. Your message is also a lot longer so on small windows there's a good chance the actual value isn't visible. I quite like how concise the current output it.

For choices:

Choices are built into argparse (see https://docs.python.org/3/library/argparse.html#choices). Do we really want to change that?

@ehelms
Copy link
Member Author
ehelms commented Apr 25, 2025

argument --database-ssl-ca should be an 'AbsolutePath' on the filesystem. The value given was 'this-is'.

Not quite IMHO because to me your message implies it must exist on the filesystem. Your message is also a lot longer so on small windows there's a good chance the actual value isn't visible. I quite like how concise the current output it.

I'd be ok with more concise. I don't find the current message clear enough and I think it's the structure of the wording. I'd appreciate getting docs input.

For choices:

Choices are built into argparse (see https://docs.python.org/3/library/argparse.html#choices). Do we really want to change that?

I don't know what that means in this context.

@ekohl
Copy link
Member
ekohl commented Apr 25, 2025
5AD2

I don't know what that means in this context.

That when we technically solve it we'll probably end up doing that separate from the specific typing. I wondered if we need to file it as a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0