Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

--ignore (and others) should be more clever when parsing #109

@aqw

Description

@aqw

Two options that I see:

  1. use comma separated lists. This is a common approach, but argparse does not support natively with the "choices" option (which is currently in use). If the "choices" functionality is not precious, then this is possible, and I would recommend creating a custom type for argparse to enforce. [1]
  2. keep space separated, and loop over the list of valid options. When an invalid option is found, assume that you're at the end of the list. That "invalid" option is either a file, or an argument. Then the normal error checking ("invalid argument" or "file not found) will kick in if the argument is indeed flase. Otherwise it's valid, and the program works as intended.

I attempted to make this change myself in a PR, but the code for ignore seems to reach into everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions