2019-09-12 18:29:55 +02:00
|
|
|
[mypy]
|
2019-10-31 16:43:24 +01:00
|
|
|
namespace_packages = True
|
2022-08-15 21:05:57 +02:00
|
|
|
plugins = pydantic.mypy, mypy_zope:plugin, scripts-dev/mypy_synapse_plugin.py
|
2021-03-26 17:49:46 +01:00
|
|
|
follow_imports = normal
|
2019-10-31 16:43:24 +01:00
|
|
|
check_untyped_defs = True
|
|
|
|
show_error_codes = True
|
|
|
|
show_traceback = True
|
|
|
|
mypy_path = stubs
|
2020-10-01 14:09:18 +02:00
|
|
|
warn_unreachable = True
|
2022-04-27 15:03:44 +02:00
|
|
|
warn_unused_ignores = True
|
2021-03-26 17:49:46 +01:00
|
|
|
local_partial_types = True
|
2021-04-05 15:10:18 +02:00
|
|
|
no_implicit_optional = True
|
2022-05-19 14:49:58 +02:00
|
|
|
disallow_untyped_defs = True
|
2022-11-17 19:34:09 +01:00
|
|
|
strict_equality = True
|
2022-12-12 22:25:07 +01:00
|
|
|
warn_redundant_casts = True
|
2023-05-16 20:27:47 +02:00
|
|
|
# Run mypy type checking with the minimum supported Python version to catch new usage
|
|
|
|
# that isn't backwards-compatible (types, overloads, etc).
|
|
|
|
python_version = 3.8
|
2020-12-17 23:58:00 +01:00
|
|
|
|
2020-08-26 15:59:37 +02:00
|
|
|
files =
|
2022-04-08 12:10:58 +02:00
|
|
|
docker/,
|
2022-03-02 19:00:26 +01:00
|
|
|
scripts-dev/,
|
2021-11-09 17:22:47 +01:00
|
|
|
synapse/,
|
2022-09-06 20:01:37 +02:00
|
|
|
tests/,
|
|
|
|
build_rust.py
|
2021-11-09 17:22:47 +01:00
|
|
|
|
2022-04-27 15:03:44 +02:00
|
|
|
[mypy-synapse.metrics._reactor_metrics]
|
|
|
|
# This module imports select.epoll. That exists on Linux, but doesn't on macOS.
|
|
|
|
# See https://github.com/matrix-org/synapse/pull/11771.
|
|
|
|
warn_unused_ignores = False
|
|
|
|
|
2022-05-19 14:49:58 +02:00
|
|
|
[mypy-synapse.util.caches.treecache]
|
|
|
|
disallow_untyped_defs = False
|
2021-10-08 16:25:16 +02:00
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
;; Dependencies without annotations
|
|
|
|
;; Before ignoring a module, check to see if type stubs are available.
|
|
|
|
;; The `typeshed` project maintains stubs here:
|
|
|
|
;; https://github.com/python/typeshed/tree/master/stubs
|
|
|
|
;; and for each package `foo` there's a corresponding `types-foo` package on PyPI,
|
2022-04-20 20:16:49 +02:00
|
|
|
;; which we can pull in as a dev dependency by adding to `pyproject.toml`'s
|
|
|
|
;; `[tool.poetry.dev-dependencies]` list.
|
2020-01-20 18:34:13 +01:00
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-authlib.*]
|
2019-09-12 18:29:55 +02:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-ijson.*]
|
2019-09-12 18:29:55 +02:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-lxml]
|
2019-09-12 18:29:55 +02:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-msgpack]
|
2019-09-12 18:29:55 +02:00
|
|
|
ignore_missing_imports = True
|
2019-10-10 10:39:35 +02:00
|
|
|
|
2021-11-09 20:04:53 +01:00
|
|
|
[mypy-parameterized.*]
|
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-pymacaroons.*]
|
2020-01-20 18:38:21 +01:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-pympler.*]
|
2020-01-20 18:38:21 +01:00
|
|
|
ignore_missing_imports = True
|
2020-05-08 14:30:40 +02:00
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-rust_python_jaeger_reporter.*]
|
2020-05-08 14:30:40 +02:00
|
|
|
ignore_missing_imports = True
|
2020-06-17 15:13:41 +02:00
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-saml2.*]
|
2020-06-17 15:13:41 +02:00
|
|
|
ignore_missing_imports = True
|
2020-08-12 16:05:50 +02:00
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-service_identity.*]
|
2020-10-02 10:57:12 +02:00
|
|
|
ignore_missing_imports = True
|
2021-01-26 16:50:21 +01:00
|
|
|
|
2022-04-27 15:10:31 +02:00
|
|
|
[mypy-srvlookup.*]
|
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-treq.*]
|
2021-05-05 17:54:36 +02:00
|
|
|
ignore_missing_imports = True
|
2021-05-20 17:11:48 +02:00
|
|
|
|
2022-03-08 14:23:18 +01:00
|
|
|
[mypy-incremental.*]
|
|
|
|
ignore_missing_imports = True
|
2022-09-06 20:01:37 +02:00
|
|
|
|
|
|
|
[mypy-setuptools_rust.*]
|
|
|
|
ignore_missing_imports = True
|