Skip to content

[Feature-Request] Allow mypy.ini to be a dot file #8510

@nioncode

Description

@nioncode

Currently, the default configuration files that are picked up are mypy.ini and setup.cfg in the current directory.
To remove clutter in the project root directory (where mypy's configuration is usually located), it would be great if .mypy.ini (i.e. with a leading dot) would also be supported and make the lookup-order: mypy.ini, .mypy.ini, setup.cfg.

It seems like most linters and formatters use dotfiles for configuration files (e.g. flake8, pydocstyle, pylint). There is already a way to use .mypy.ini through the --config-file command line argument, but it would be great if it would be picked up automatically, if it exists.

(On a side node, .mypy.ini is used with the dot when falling back to the configuration file in the user's home directory, so it makes sense to also support the dotfile variant in the current directory).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions