2019-09-12 19:29:55 +03:00
|
|
|
[mypy]
|
2019-10-31 18:43:24 +03:00
|
|
|
namespace_packages = True
|
2022-08-15 22:05:57 +03:00
|
|
|
plugins = pydantic.mypy, mypy_zope:plugin, scripts-dev/mypy_synapse_plugin.py
|
2021-03-26 19:49:46 +03:00
|
|
|
follow_imports = normal
|
2019-10-31 18:43:24 +03:00
|
|
|
check_untyped_defs = True
|
|
|
|
show_error_codes = True
|
|
|
|
show_traceback = True
|
|
|
|
mypy_path = stubs
|
2020-10-01 15:09:18 +03:00
|
|
|
warn_unreachable = True
|
2022-04-27 16:03:44 +03:00
|
|
|
warn_unused_ignores = True
|
2021-03-26 19:49:46 +03:00
|
|
|
local_partial_types = True
|
2021-04-05 16:10:18 +03:00
|
|
|
no_implicit_optional = True
|
2022-05-19 15:49:58 +03:00
|
|
|
disallow_untyped_defs = True
|
2020-12-18 01:58:00 +03:00
|
|
|
|
2020-08-26 16:59:37 +03:00
|
|
|
files =
|
2022-04-08 13:10:58 +03:00
|
|
|
docker/,
|
2022-03-02 21:00:26 +03:00
|
|
|
scripts-dev/,
|
2021-11-09 19:22:47 +03:00
|
|
|
synapse/,
|
2022-09-06 21:01:37 +03:00
|
|
|
tests/,
|
|
|
|
build_rust.py
|
2021-11-09 19:22:47 +03: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/api/test_auth.py
|
|
|
|
|tests/api/test_ratelimiting.py
|
|
|
|
|tests/app/test_openid_listener.py
|
|
|
|
|tests/appservice/test_scheduler.py
|
|
|
|
|tests/config/test_cache.py
|
|
|
|
|tests/config/test_tls.py
|
|
|
|
|tests/crypto/test_keyring.py
|
|
|
|
|tests/events/test_presence_router.py
|
|
|
|
|tests/events/test_utils.py
|
|
|
|
|tests/federation/test_federation_catch_up.py
|
|
|
|
|tests/federation/test_federation_sender.py
|
|
|
|
|tests/federation/transport/test_knocking.py
|
|
|
|
|tests/handlers/test_typing.py
|
|
|
|
|tests/http/federation/test_matrix_federation_agent.py
|
|
|
|
|tests/http/federation/test_srv_resolver.py
|
|
|
|
|tests/http/test_proxyagent.py
|
|
|
|
|tests/logging/__init__.py
|
|
|
|
|tests/logging/test_terse_json.py
|
|
|
|
|tests/module_api/test_api.py
|
|
|
|
|tests/push/test_email.py
|
|
|
|
|tests/push/test_presentable_names.py
|
|
|
|
|tests/push/test_push_rule_evaluator.py
|
|
|
|
|tests/rest/client/test_transactions.py
|
|
|
|
|tests/rest/media/v1/test_media_storage.py
|
|
|
|
|tests/server.py
|
|
|
|
|tests/server_notices/test_resource_limits_server_notices.py
|
|
|
|
|tests/test_metrics.py
|
|
|
|
|tests/test_state.py
|
|
|
|
|tests/test_terms_auth.py
|
|
|
|
|tests/util/caches/test_cached_call.py
|
|
|
|
|tests/util/caches/test_deferred_cache.py
|
|
|
|
|tests/util/caches/test_descriptors.py
|
|
|
|
|tests/util/caches/test_response_cache.py
|
|
|
|
|tests/util/caches/test_ttlcache.py
|
|
|
|
|tests/util/test_async_helpers.py
|
|
|
|
|tests/util/test_batching_queue.py
|
|
|
|
|tests/util/test_dict_cache.py
|
|
|
|
|tests/util/test_expiring_cache.py
|
|
|
|
|tests/util/test_file_consumer.py
|
|
|
|
|tests/util/test_linearizer.py
|
|
|
|
|tests/util/test_logcontext.py
|
|
|
|
|tests/util/test_lrucache.py
|
|
|
|
|tests/util/test_rwlock.py
|
|
|
|
|tests/util/test_wheel_timer.py
|
|
|
|
)$
|
2019-09-12 19:29:55 +03:00
|
|
|
|
2021-12-02 19:18:10 +03:00
|
|
|
[mypy-synapse.federation.transport.client]
|
|
|
|
disallow_untyped_defs = False
|
|
|
|
|
2022-05-19 15:49:58 +03:00
|
|
|
[mypy-synapse.http.client]
|
|
|
|
disallow_untyped_defs = False
|
2021-12-14 20:35:28 +03:00
|
|
|
|
2022-05-19 15:49:58 +03:00
|
|
|
[mypy-synapse.http.matrixfederationclient]
|
|
|
|
disallow_untyped_defs = False
|
2022-05-13 14:35:31 +03:00
|
|
|
|
2022-04-27 16:03:44 +03:00
|
|
|
[mypy-synapse.metrics._reactor_metrics]
|
2022-05-19 15:49:58 +03:00
|
|
|
disallow_untyped_defs = False
|
2022-04-27 16:03:44 +03: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 15:49:58 +03:00
|
|
|
[mypy-synapse.util.caches.treecache]
|
|
|
|
disallow_untyped_defs = False
|
2021-10-08 17:25:16 +03:00
|
|
|
|
2022-05-19 15:49:58 +03:00
|
|
|
[mypy-synapse.server]
|
|
|
|
disallow_untyped_defs = False
|
2022-05-13 14:35:31 +03:00
|
|
|
|
2022-05-19 15:49:58 +03:00
|
|
|
[mypy-synapse.storage.database]
|
|
|
|
disallow_untyped_defs = False
|
2021-09-10 19:03:18 +03:00
|
|
|
|
2022-05-19 15:49:58 +03:00
|
|
|
[mypy-tests.*]
|
2021-11-16 16:47:36 +03:00
|
|
|
disallow_untyped_defs = False
|
2021-10-06 13:20:49 +03:00
|
|
|
|
2021-11-12 23:10:03 +03:00
|
|
|
[mypy-tests.handlers.test_user_directory]
|
|
|
|
disallow_untyped_defs = True
|
2021-11-15 15:59:33 +03:00
|
|
|
|
2022-06-28 15:12:17 +03:00
|
|
|
[mypy-tests.test_server]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2022-06-09 11:48:04 +03:00
|
|
|
[mypy-tests.state.test_profile]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-11-15 15:59:33 +03:00
|
|
|
[mypy-tests.storage.test_profile]
|
|
|
|
disallow_untyped_defs = True
|
2021-11-12 23:10:03 +03:00
|
|
|
|
|
|
|
[mypy-tests.storage.test_user_directory]
|
2021-09-30 13:04:40 +03:00
|
|
|
disallow_untyped_defs = True
|
2021-12-16 22:59:56 +03:00
|
|
|
|
2022-03-03 19:05:44 +03:00
|
|
|
[mypy-tests.rest.*]
|
2021-11-12 22:56:00 +03:00
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-11-29 14:11:46 +03:00
|
|
|
[mypy-tests.federation.transport.test_client]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2022-07-05 17:13:47 +03:00
|
|
|
[mypy-tests.utils]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-11-29 14:11:46 +03:00
|
|
|
|
2021-10-08 16:49:41 +03: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 21:16:49 +03:00
|
|
|
;; which we can pull in as a dev dependency by adding to `pyproject.toml`'s
|
|
|
|
;; `[tool.poetry.dev-dependencies]` list.
|
2020-01-20 20:34:13 +03:00
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-authlib.*]
|
2019-09-12 19:29:55 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-canonicaljson]
|
2019-09-12 19:29:55 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-ijson.*]
|
2019-09-12 19:29:55 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-lxml]
|
2019-09-12 19:29:55 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-msgpack]
|
2019-09-12 19:29:55 +03:00
|
|
|
ignore_missing_imports = True
|
2019-10-10 11:39:35 +03:00
|
|
|
|
2022-05-03 13:03:20 +03:00
|
|
|
# Note: WIP stubs available at
|
|
|
|
# https://github.com/microsoft/python-type-stubs/tree/64934207f523ad6b611e6cfe039d85d7175d7d0d/netaddr
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-netaddr]
|
2019-10-10 11:39:35 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-11-09 22:04:53 +03:00
|
|
|
[mypy-parameterized.*]
|
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-pymacaroons.*]
|
2020-01-20 20:38:21 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-pympler.*]
|
2020-01-20 20:38:21 +03:00
|
|
|
ignore_missing_imports = True
|
2020-05-08 15:30:40 +03:00
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-rust_python_jaeger_reporter.*]
|
2020-05-08 15:30:40 +03:00
|
|
|
ignore_missing_imports = True
|
2020-06-17 16:13:41 +03:00
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-saml2.*]
|
2020-06-17 16:13:41 +03:00
|
|
|
ignore_missing_imports = True
|
2020-08-12 17:05:50 +03:00
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-service_identity.*]
|
2020-10-02 11:57:12 +03:00
|
|
|
ignore_missing_imports = True
|
2021-01-26 18:50:21 +03:00
|
|
|
|
2022-04-27 16:10:31 +03:00
|
|
|
[mypy-srvlookup.*]
|
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-treq.*]
|
2021-05-05 18:54:36 +03:00
|
|
|
ignore_missing_imports = True
|
2021-05-20 18:11:48 +03:00
|
|
|
|
2022-03-08 16:23:18 +03:00
|
|
|
[mypy-incremental.*]
|
|
|
|
ignore_missing_imports = True
|
2022-09-06 21:01:37 +03:00
|
|
|
|
|
|
|
[mypy-setuptools_rust.*]
|
|
|
|
ignore_missing_imports = True
|