python-poetry / python-poetry/poetry-plugin-export

Insufficient error message when passing invalid argument to -f option of export command

Open
#27 0 comments 3 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.