This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Commit d435e9c
committed
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 <[email protected]>1 parent c99da2d commit d435e9c
3 files changed
+251
-384
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
This file was deleted.
0 commit comments