Skip to content

Permit configuration via a stand-alone TOML file (mypy.toml) #18617

Description

@AA-Turner

Feature

In #5205, MyPy gained support for declaring configuration in the TOML format, but only in pyproject.toml. I propose supporting configuration via a stand-alone TOML document, such as mypy.toml or .mypy.toml.

Pitch

This parallels, and perhaps would eventually replace, configuration via mypy.ini. This is most useful when checking non-project code, such as in Python (python/cpython#129708), where we have several distinct mypy.ini files to support type-checking different directories of a larger project. It may be useful for mono-repo layouts, where again the use of pyproject.toml is undesirable. Finally, this would be useful to keep tool configuration to independent files — in the Sphinx project, there are several hundred lines of mypy configuration in pyproject.toml, dominating the content of the file.

A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions