mccabe icon indicating copy to clipboard operation
mccabe copied to clipboard

[Proposal] Add a check for none/multiple positional arguments

Open jrom99 opened this issue 3 years ago • 0 comments

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?

jrom99 avatar Jan 31 '22 16:01 jrom99