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

The CommaSeparatedTupleParamType's error is too specific #403

Open
fpgmaas opened this issue May 16, 2023 · 0 comments
Open

The CommaSeparatedTupleParamType's error is too specific #403

fpgmaas opened this issue May 16, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@fpgmaas
Copy link
Owner

fpgmaas commented May 16, 2023

Describe the bug

The CommaSeparatedTupleParamType as defined here raises a slightly confusing error. I think a common mistake will be to separate the elements within a list with , instead of |. Right now, the error displayed points to the = as the mistake.

Also the error is specific to its use as package-module-name-map, which does not allow it for other purposes.

To Reproduce

Run

deptry . --package-module-name-map foo=bar,baz

which outputs:

ValueError: package name and module names pairs should be concatenated with an equal sign (=): baz

Expected behavior

  • The error should not be specific to packages and modules, since it might be used in a different context.
  • The error should be improved, so the user knows when to use the | and ,.
@fpgmaas fpgmaas added the bug Something isn't working label May 16, 2023
@fpgmaas fpgmaas changed the title The CommaSeparatedTupleParamType's error can be improved. The CommaSeparatedTupleParamType's error is too specific May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant