Skip to content

Allow 'x_' flags in the [mypy-foo] section of mypy.ini #4521

Closed
@gvanrossum

Description

@gvanrossum

This is a feature request.

I'd like to use the [mypy-foo] sections in mypy.ini to control behavior of some other tool (so I can have a centralized config file -- the tool is a linter that requires annotations if a certain flag is set). I can't reuse an existing mypy flag.

Currently mypy complains if it finds an unrecognized flag. That's still useful, but I'd like to exempt certain flags from those complaints. IIRC in mail headers, any flag starting with X- is allowed. I propose to do a similar thing for mypy -- if the flag name starts with x_, mypy will ignore it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions