This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move mypy configuration into pyproject.toml
This is mainly to take advantage of the significantly more convenient syntax for module overrides. For example, instead of: [mypy-synapse.api.*] disallow_untyped_defs = True [mypy-synapse.app.*] disallow_untyped_defs = True [mypy-synapse.crypto.*] disallow_untyped_defs = True The pyproject.toml file allows: [[tool.mypy.overrides]] module = [ "synapse.api.*", "synapse.app.*", "synapse.crypto.*", ] disallow_untyped_defs = true Not a huge difference with two or three modules, but we list many more. This is especially important as I'm about to set disallow_untyped_defs at the global level and provide module-level opt-outs so that we require typed definitions in all newly added code. Switching to this format will save several hundred lines of repetitive boilerplate and clarify the intent of each stanza. It's also easier to keep things ordered, since it works to just pipe a region to `sort`, while mypy.ini requires handling a 3-line structure. Ordering helps keep these settings synced up with the files on disk. Signed-off-by: Dan Callahan <danc@element.io>
- Loading branch information