codespell-project / codespell

check code for common misspellings
GNU General Public License v2.0
1.81k stars 465 forks source link

Consistent error messages #3440

Closed DimitriPapadopoulos closed 1 month ago

DimitriPapadopoulos commented 1 month ago

The argparse error messages look like this:

usage: codespell [-h] [--version] ...
                 [files ...]
codespell: error: argument -i/--interactive: invalid choice: -1 (choose from 0, 1, 2, 3)

For codespell error messages consistent with argparse error messages:

Noticed these while finalising #3344.

larsoner commented 1 month ago

Thanks @DimitriPapadopoulos