Skip to content

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

Description

@jrom99

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions