python-poetry / python-poetry/poetry-plugin-export
Insufficient error message when passing invalid argument to -f option of export command
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 335
- Forks
- 57
- Avg merge
- 1h 23m
- Merged PRs (30d)
- 3
Description
- I have searched the issues of this repo and believe that this is not a duplicate.
Issue
Though this issue is similar to python-poetry/poetry#1640, different a bit.I think the Exporter error message is not enough.
When I used export command for the first time, I didn't know how to specify -f option. So I tried:
$ poetry export -f requirements -o requirements.txt
The result of the above command is below.
[ValueError]
Invalid export format: requirements
poetry said I was wrong, but it did not tell me how should I do. The error message should tell us how to specify -f option. For example, if it show list of accepted formats, it helping for me.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the export command's handling of the -f option and the Exporter validation that emits "Invalid export format". Reproduce the command shown with an unsupported format, then inspect how accepted formats are represented. Done means invalid-format errors explain the available choices and the behavior is covered by a test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100