Closed emanuele6 closed 2 weeks ago
I bisected the problem; it was introduced with 24da5065e1fefcf276f60412e90491b578778fde that replaced all calls to parser.error(message)
with calls to parser.exit(EXIT_CODE_ARGPARSE_ERROR, message)
.
Before the change, those argparse errors were displayed as:
$ ./autopep8.py
usage: autopep8 [-h] [--version] [-v] [-d] [-i] [--global-config filename]
[--ignore-local-config] [-r] [-j n] [-p n] [-a]
[--experimental] [--exclude globs] [--list-fixes]
[--ignore errors] [--select errors] [--max-line-length n]
[--line-range line line] [--hang-closing] [--exit-code]
[files ...]
autopep8: error: incorrect number of arguments
$
Now, they are displayed as:
$ ./autopep8.py
incorrect number of arguments$ # no trailing newline
Thanks for reporting 👍
fix and v2.3.1 has been released. https://pypi.org/project/autopep8/2.3.1/
Command Line
Your Environment
Python 3.11.5
autopep8 2.0.4 (pycodestyle: 2.11.0)
Errors are printed without a trailing newline