Skip to content
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

Improve documentation of supported arguments #938

Closed
WoosterInitiative opened this issue Mar 19, 2024 · 5 comments
Closed

Improve documentation of supported arguments #938

WoosterInitiative opened this issue Mar 19, 2024 · 5 comments

Comments

@WoosterInitiative
Copy link

I would have sworn that I've seen some of this documented before, but I can't find it.

What I specifically was looking for was the supported version flags (--py310-plus, --py311-plus, etc.). I had a typo in mine in pre-commit (--312plus), which I could have determined myself without docs, but I feel that having them documented instead of buried at the bottom of a somewhat obscure _main.py file is less than intuitive.

I'd be happy to do it myself if there isn't an objection?

@asottile
Copy link
Owner

there's no reason to. when you typo'd the tool spit out the answer you were looking for directly and the standard way to ask a tool what it supports is via --help

@WoosterInitiative
Copy link
Author

Sure, but when using pre-commit, there may not be a local install to run --help with. Also, the "answer" it provided was less than helpful. Helpful messages I've seen will say things like "'--py312plus' is not a valid argument, valid choices are '--py310-plus', '--py311-plus'" etc., or perhaps point to documentation.

I guess I don't see why this is such a difficult ask. Even if the readme pointed the user to the appropriate file to avoid having to remember to update the readme every time a new option was added, that would help hapless users such as myself, I think.

@asottile
Copy link
Owner

I've seen will say things like "'--py312plus' is not a valid argument, valid choices are '--py310-plus', '--py311-plus'" etc

that's literally what it does

@WoosterInitiative
Copy link
Author

that's literally what it does

Holy balls, man, I missed that somehow. Just tested by intentionally mis-typing it and it does exactly that. Sorry for the trouble!

@asottile
Copy link
Owner

I'm sure you can see now why I'm frustrated that you wasted both of our time on this

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