PyCQA / modernize

Modernizes Python code for eventual Python 3 migration. Built on top of fissix (a fork of lib2to3)
https://modernize.readthedocs.org/
Other
353 stars 51 forks source link

`python-modernize -f foobar` raises an `IndexError` #195

Open ngie-eign opened 5 years ago

ngie-eign commented 5 years ago

It looks like there's a bug in the code involved with printing out an error message about the option passed to -f being an invalid fixer:

$ python-modernize -f lib2to3.fixes.long -w ...
Loading the following fixers:
Traceback (most recent call last):
  File "/home/ecooper/.local/bin/python-modernize", line 10, in <module>
    sys.exit(main())
  File "/home/ecooper/.local/lib/python2.7/site-packages/libmodernize/main.py", line 171, in main
    print("    {}  ({})".format(fixname, fixname.split(".fix_", 1)[1]), file=sys.stderr)
IndexError: list index out of range
$ python-modernize --version
modernize 0.7.0
$
Lord-Zod commented 6 months ago

I'm having this exact same problem with version 0.8.0

Any updates?