Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jrom99 opened this issue Jan 31, 2022 · 0 comments
Open

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

jrom99 opened this issue Jan 31, 2022 · 0 comments

Comments

@jrom99
Copy link

jrom99 commented Jan 31, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant