fpgmaas/deptry

The CommaSeparatedTupleParamType's error is too specific

fpgmaas opened this issue · 0 comments

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 ,.