mccabe
mccabe copied to clipboard
[Proposal] Add a check for none/multiple positional arguments
The current behaviour of python -m mccabe (no positional argument provided) is an IndexError
File "/home/junior/.local/lib/python3.10/site-packages/mccabe.py", line 327, in main
code = _read(args[0])
IndexError: list index out of range
Also, for python -m mccabe file1 file2 it just ignores file2.
Would it be possible to add a check for a missing positional argument, and another for multiple ones?