2019-09-12 10:29:55 -06:00
|
|
|
[mypy]
|
2019-10-31 09:43:24 -06:00
|
|
|
namespace_packages = True
|
2022-08-15 13:05:57 -06:00
|
|
|
plugins = pydantic.mypy, mypy_zope:plugin, scripts-dev/mypy_synapse_plugin.py
|
2021-03-26 10:49:46 -06:00
|
|
|
follow_imports = normal
|
2019-10-31 09:43:24 -06:00
|
|
|
check_untyped_defs = True
|
|
|
|
show_error_codes = True
|
|
|
|
show_traceback = True
|
|
|
|
mypy_path = stubs
|
2020-10-01 06:09:18 -06:00
|
|
|
warn_unreachable = True
|
2022-04-27 07:03:44 -06:00
|
|
|
warn_unused_ignores = True
|
2021-03-26 10:49:46 -06:00
|
|
|
local_partial_types = True
|
2021-04-05 07:10:18 -06:00
|
|
|
no_implicit_optional = True
|
2022-05-19 06:49:58 -06:00
|
|
|
disallow_untyped_defs = True
|
2022-11-17 11:34:09 -07:00
|
|
|
strict_equality = True
|
2022-12-12 14:25:07 -07:00
|
|
|
warn_redundant_casts = True
|
2020-12-17 15:58:00 -07:00
|
|
|
|
2020-08-26 07:59:37 -06:00
|
|
|
files =
|
2022-04-08 04:10:58 -06:00
|
|
|
docker/,
|
2022-03-02 11:00:26 -07:00
|
|
|
scripts-dev/,
|
2021-11-09 09:22:47 -07:00
|
|
|
synapse/,
|
2022-09-06 12:01:37 -06:00
|
|
|
tests/,
|
|
|
|
build_rust.py
|
2021-11-09 09:22:47 -07:00
|
|
|
|
|
|
|
# Note: Better exclusion syntax coming in mypy > 0.910
|
|
|
|
# https://github.com/python/mypy/pull/11329
|
|
|
|
#
|
|
|
|
# For now, set the (?x) flag enable "verbose" regexes
|
|
|
|
# https://docs.python.org/3/library/re.html#re.X
|
|
|
|
exclude = (?x)
|
|
|
|
^(
|
|
|
|
|synapse/storage/databases/__init__.py
|
|
|
|
|synapse/storage/databases/main/cache.py
|
|
|
|
|synapse/storage/schema/
|
|
|
|
|
|
|
|
|tests/http/federation/test_matrix_federation_agent.py
|
|
|
|
|tests/http/federation/test_srv_resolver.py
|
|
|
|
|tests/http/test_proxyagent.py
|
|
|
|
|tests/module_api/test_api.py
|
|
|
|
|tests/rest/media/v1/test_media_storage.py
|
|
|
|
|tests/server.py
|
|
|
|
|tests/test_state.py
|
|
|
|
|tests/test_terms_auth.py
|
|
|
|
)$
|
2019-09-12 10:29:55 -06:00
|
|
|
|
2021-12-02 09:18:10 -07:00
|
|
|
[mypy-synapse.federation.transport.client]
|
|
|
|
disallow_untyped_defs = False
|
|
|
|
|
2022-05-19 06:49:58 -06:00
|
|
|
[mypy-synapse.http.client]
|
|
|
|
disallow_untyped_defs = False
|
2021-12-14 10:35:28 -07:00
|
|
|
|
2022-05-19 06:49:58 -06:00
|
|
|
[mypy-synapse.http.matrixfederationclient]
|
|
|
|
disallow_untyped_defs = False
|
2022-05-13 05:35:31 -06:00
|
|
|
|
2022-04-27 07:03:44 -06:00
|
|
|
[mypy-synapse.metrics._reactor_metrics]
|
2022-05-19 06:49:58 -06:00
|
|
|
disallow_untyped_defs = False
|
2022-04-27 07:03:44 -06:00
|
|
|
# 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 06:49:58 -06:00
|
|
|
[mypy-synapse.util.caches.treecache]
|
|
|
|
disallow_untyped_defs = False
|
2021-10-08 08:25:16 -06:00
|
|
|
|
2022-05-19 06:49:58 -06:00
|
|
|
[mypy-synapse.server]
|
|
|
|
disallow_untyped_defs = False
|
2022-05-13 05:35:31 -06:00
|
|
|
|
2022-05-19 06:49:58 -06:00
|
|
|
[mypy-synapse.storage.database]
|
|
|
|
disallow_untyped_defs = False
|
2021-09-10 10:03:18 -06:00
|
|
|
|
2022-05-19 06:49:58 -06:00
|
|
|
[mypy-tests.*]
|
2021-11-16 06:47:36 -07:00
|
|
|
disallow_untyped_defs = False
|
2021-10-06 04:20:49 -06:00
|
|
|
|
2023-02-03 13:03:23 -07:00
|
|
|
[mypy-tests.api.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2023-02-03 12:22:40 -07:00
|
|
|
[mypy-tests.app.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2023-02-06 05:49:06 -07:00
|
|
|
[mypy-tests.appservice.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2022-12-16 06:53:28 -07:00
|
|
|
[mypy-tests.config.*]
|
2022-12-12 17:54:46 -07:00
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2022-12-28 06:29:35 -07:00
|
|
|
[mypy-tests.crypto.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2023-01-25 13:14:03 -07:00
|
|
|
[mypy-tests.events.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2023-02-06 09:05:06 -07:00
|
|
|
[mypy-tests.federation.*]
|
2022-12-12 17:54:46 -07:00
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2022-12-16 04:53:01 -07:00
|
|
|
[mypy-tests.handlers.*]
|
2021-11-12 13:10:03 -07:00
|
|
|
disallow_untyped_defs = True
|
2021-11-15 05:59:33 -07:00
|
|
|
|
2023-01-26 12:45:24 -07:00
|
|
|
[mypy-tests.logging.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2022-12-28 06:29:35 -07:00
|
|
|
[mypy-tests.metrics.*]
|
2022-10-31 07:02:07 -06:00
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2023-01-11 05:35:40 -07:00
|
|
|
[mypy-tests.push.*]
|
2022-10-06 07:00:03 -06:00
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2023-02-06 07:55:00 -07:00
|
|
|
[mypy-tests.replication.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2022-12-12 17:54:46 -07:00
|
|
|
[mypy-tests.rest.*]
|
2022-06-28 06:12:17 -06:00
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2022-06-09 02:48:04 -06:00
|
|
|
[mypy-tests.state.test_profile]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2022-12-09 10:36:32 -07:00
|
|
|
[mypy-tests.storage.*]
|
2021-09-30 04:04:40 -06:00
|
|
|
disallow_untyped_defs = True
|
2021-12-16 12:59:56 -07:00
|
|
|
|
2022-12-12 17:54:46 -07:00
|
|
|
[mypy-tests.test_server]
|
2021-11-12 12:56:00 -07:00
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2022-12-12 17:54:46 -07:00
|
|
|
[mypy-tests.types.*]
|
2021-11-29 04:11:46 -07:00
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2022-11-22 15:35:54 -07:00
|
|
|
[mypy-tests.util.caches.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-tests.util.caches.test_descriptors]
|
|
|
|
disallow_untyped_defs = False
|
|
|
|
|
2022-12-02 10:58:56 -07:00
|
|
|
[mypy-tests.util.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2022-07-05 08:13:47 -06:00
|
|
|
[mypy-tests.utils]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-08 07:49:41 -06: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 12:16:49 -06:00
|
|
|
;; which we can pull in as a dev dependency by adding to `pyproject.toml`'s
|
|
|
|
;; `[tool.poetry.dev-dependencies]` list.
|
2020-01-20 10:34:13 -07:00
|
|
|
|
2021-10-08 07:49:41 -06:00
|
|
|
[mypy-authlib.*]
|
2019-09-12 10:29:55 -06:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 07:49:41 -06:00
|
|
|
[mypy-ijson.*]
|
2019-09-12 10:29:55 -06:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 07:49:41 -06:00
|
|
|
[mypy-lxml]
|
2019-09-12 10:29:55 -06:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 07:49:41 -06:00
|
|
|
[mypy-msgpack]
|
2019-09-12 10:29:55 -06:00
|
|
|
ignore_missing_imports = True
|
2019-10-10 02:39:35 -06:00
|
|
|
|
2022-05-03 04:03:20 -06:00
|
|
|
# Note: WIP stubs available at
|
|
|
|
# https://github.com/microsoft/python-type-stubs/tree/64934207f523ad6b611e6cfe039d85d7175d7d0d/netaddr
|
2021-10-08 07:49:41 -06:00
|
|
|
[mypy-netaddr]
|
2019-10-10 02:39:35 -06:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-11-09 12:04:53 -07:00
|
|
|
[mypy-parameterized.*]
|
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 07:49:41 -06:00
|
|
|
[mypy-pymacaroons.*]
|
2020-01-20 10:38:21 -07:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 07:49:41 -06:00
|
|
|
[mypy-pympler.*]
|
2020-01-20 10:38:21 -07:00
|
|
|
ignore_missing_imports = True
|
2020-05-08 06:30:40 -06:00
|
|
|
|
2021-10-08 07:49:41 -06:00
|
|
|
[mypy-rust_python_jaeger_reporter.*]
|
2020-05-08 06:30:40 -06:00
|
|
|
ignore_missing_imports = True
|
2020-06-17 07:13:41 -06:00
|
|
|
|
2021-10-08 07:49:41 -06:00
|
|
|
[mypy-saml2.*]
|
2020-06-17 07:13:41 -06:00
|
|
|
ignore_missing_imports = True
|
2020-08-12 08:05:50 -06:00
|
|
|
|
2021-10-08 07:49:41 -06:00
|
|
|
[mypy-service_identity.*]
|
2020-10-02 02:57:12 -06:00
|
|
|
ignore_missing_imports = True
|
2021-01-26 08:50:21 -07:00
|
|
|
|
2022-04-27 07:10:31 -06:00
|
|
|
[mypy-srvlookup.*]
|
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 07:49:41 -06:00
|
|
|
[mypy-treq.*]
|
2021-05-05 09:54:36 -06:00
|
|
|
ignore_missing_imports = True
|
2021-05-20 09:11:48 -06:00
|
|
|
|
2022-03-08 06:23:18 -07:00
|
|
|
[mypy-incremental.*]
|
|
|
|
ignore_missing_imports = True
|
2022-09-06 12:01:37 -06:00
|
|
|
|
|
|
|
[mypy-setuptools_rust.*]
|
|
|
|
ignore_missing_imports = True
|