2019-09-12 18:29:55 +02:00
|
|
|
[mypy]
|
2019-10-31 16:43:24 +01:00
|
|
|
namespace_packages = True
|
2020-09-03 16:38:32 +02:00
|
|
|
plugins = 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
|
2021-03-26 17:49:46 +01:00
|
|
|
local_partial_types = True
|
2021-04-05 15:10:18 +02:00
|
|
|
no_implicit_optional = True
|
2020-12-17 23:58:00 +01:00
|
|
|
|
|
|
|
# To find all folders that pass mypy you run:
|
|
|
|
#
|
|
|
|
# find synapse/* -type d -not -name __pycache__ -exec bash -c "mypy '{}' > /dev/null" \; -print
|
|
|
|
|
2020-08-26 15:59:37 +02:00
|
|
|
files =
|
2020-11-24 13:53:00 +01:00
|
|
|
scripts-dev/sign_json,
|
2021-10-28 15:14:42 +02:00
|
|
|
synapse/__init__.py,
|
2020-08-26 15:59:37 +02:00
|
|
|
synapse/api,
|
|
|
|
synapse/appservice,
|
|
|
|
synapse/config,
|
2021-01-04 16:04:50 +01:00
|
|
|
synapse/crypto,
|
2020-08-26 15:59:37 +02:00
|
|
|
synapse/event_auth.py,
|
|
|
|
synapse/events/builder.py,
|
2021-10-13 13:24:07 +02:00
|
|
|
synapse/events/presence_router.py,
|
|
|
|
synapse/events/snapshot.py,
|
2020-08-26 15:59:37 +02:00
|
|
|
synapse/events/spamcheck.py,
|
2021-03-24 11:49:01 +01:00
|
|
|
synapse/events/third_party_rules.py,
|
2021-10-13 13:24:07 +02:00
|
|
|
synapse/events/utils.py,
|
2021-03-24 11:49:01 +01:00
|
|
|
synapse/events/validator.py,
|
2020-08-26 15:59:37 +02:00
|
|
|
synapse/federation,
|
2021-02-17 14:41:47 +01:00
|
|
|
synapse/groups,
|
2021-01-28 14:34:19 +01:00
|
|
|
synapse/handlers,
|
2021-10-28 15:14:42 +02:00
|
|
|
synapse/http,
|
2020-09-08 22:50:51 +02:00
|
|
|
synapse/logging,
|
2020-08-26 15:59:37 +02:00
|
|
|
synapse/metrics,
|
|
|
|
synapse/module_api,
|
|
|
|
synapse/notifier.py,
|
2020-12-11 17:43:53 +01:00
|
|
|
synapse/push,
|
2020-08-26 15:59:37 +02:00
|
|
|
synapse/replication,
|
|
|
|
synapse/rest,
|
|
|
|
synapse/server.py,
|
|
|
|
synapse/server_notices,
|
|
|
|
synapse/spam_checker_api,
|
|
|
|
synapse/state,
|
2020-12-30 14:09:53 +01:00
|
|
|
synapse/storage/__init__.py,
|
|
|
|
synapse/storage/_base.py,
|
|
|
|
synapse/storage/background_updates.py,
|
2020-10-28 16:12:21 +01:00
|
|
|
synapse/storage/databases/main/appservice.py,
|
2021-10-12 14:50:34 +02:00
|
|
|
synapse/storage/databases/main/client_ips.py,
|
2020-09-11 13:22:55 +02:00
|
|
|
synapse/storage/databases/main/events.py,
|
2021-01-04 16:04:50 +01:00
|
|
|
synapse/storage/databases/main/keys.py,
|
2020-12-16 17:25:30 +01:00
|
|
|
synapse/storage/databases/main/pusher.py,
|
2020-10-22 12:56:58 +02:00
|
|
|
synapse/storage/databases/main/registration.py,
|
2021-10-28 20:35:12 +02:00
|
|
|
synapse/storage/databases/main/relations.py,
|
2021-08-24 14:14:03 +02:00
|
|
|
synapse/storage/databases/main/session.py,
|
2020-09-02 18:52:38 +02:00
|
|
|
synapse/storage/databases/main/stream.py,
|
2020-08-26 15:59:37 +02:00
|
|
|
synapse/storage/databases/main/ui_auth.py,
|
2021-09-15 15:54:13 +02:00
|
|
|
synapse/storage/databases/state,
|
2020-08-26 15:59:37 +02:00
|
|
|
synapse/storage/database.py,
|
|
|
|
synapse/storage/engines,
|
2020-12-30 14:09:53 +01:00
|
|
|
synapse/storage/keys.py,
|
2020-09-11 13:22:55 +02:00
|
|
|
synapse/storage/persist_events.py,
|
2020-12-30 14:09:53 +01:00
|
|
|
synapse/storage/prepare_database.py,
|
|
|
|
synapse/storage/purge_events.py,
|
|
|
|
synapse/storage/push_rule.py,
|
|
|
|
synapse/storage/relations.py,
|
|
|
|
synapse/storage/roommember.py,
|
2020-08-26 15:59:37 +02:00
|
|
|
synapse/storage/state.py,
|
2020-12-30 14:09:53 +01:00
|
|
|
synapse/storage/types.py,
|
2020-08-26 15:59:37 +02:00
|
|
|
synapse/storage/util,
|
|
|
|
synapse/streams,
|
|
|
|
synapse/types.py,
|
2021-09-10 18:03:18 +02:00
|
|
|
synapse/util,
|
2021-03-24 11:49:01 +01:00
|
|
|
synapse/visibility.py,
|
2020-08-26 15:59:37 +02:00
|
|
|
tests/replication,
|
2021-07-14 15:13:40 +02:00
|
|
|
tests/test_event_auth.py,
|
2020-08-26 15:59:37 +02:00
|
|
|
tests/test_utils,
|
2020-12-01 12:10:42 +01:00
|
|
|
tests/handlers/test_password_providers.py,
|
2021-09-06 12:37:54 +02:00
|
|
|
tests/handlers/test_room.py,
|
2021-08-16 16:49:12 +02:00
|
|
|
tests/handlers/test_room_summary.py,
|
2021-08-27 17:33:41 +02:00
|
|
|
tests/handlers/test_send_email.py,
|
2021-08-19 17:12:55 +02:00
|
|
|
tests/handlers/test_sync.py,
|
2021-09-24 11:38:22 +02:00
|
|
|
tests/handlers/test_user_directory.py,
|
2021-08-20 18:50:44 +02:00
|
|
|
tests/rest/client/test_login.py,
|
|
|
|
tests/rest/client/test_auth.py,
|
2021-10-14 15:19:35 +02:00
|
|
|
tests/rest/client/test_relations.py,
|
2021-10-12 19:19:35 +02:00
|
|
|
tests/rest/media/v1/test_filepath.py,
|
2021-10-13 13:00:07 +02:00
|
|
|
tests/rest/media/v1/test_oembed.py,
|
2021-09-14 17:35:53 +02:00
|
|
|
tests/storage/test_state.py,
|
2021-09-24 11:38:22 +02:00
|
|
|
tests/storage/test_user_directory.py,
|
2021-05-24 21:32:01 +02:00
|
|
|
tests/util/test_itertools.py,
|
2020-08-26 15:59:37 +02:00
|
|
|
tests/util/test_stream_change_cache.py
|
2019-09-12 18:29:55 +02:00
|
|
|
|
2021-10-18 21:01:10 +02:00
|
|
|
[mypy-synapse.api.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-21 15:07:07 +02:00
|
|
|
[mypy-synapse.crypto.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-13 13:24:07 +02:00
|
|
|
[mypy-synapse.events.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-20 14:56:23 +02:00
|
|
|
[mypy-synapse.handlers.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-11 18:42:10 +02:00
|
|
|
[mypy-synapse.push.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-15 14:45:32 +02:00
|
|
|
[mypy-synapse.rest.*]
|
2021-09-03 15:22:22 +02:00
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-07 20:55:15 +02:00
|
|
|
[mypy-synapse.server_notices.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-06 19:55:25 +02:00
|
|
|
[mypy-synapse.state.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-12 14:50:34 +02:00
|
|
|
[mypy-synapse.storage.databases.main.client_ips]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-08 16:25:16 +02:00
|
|
|
[mypy-synapse.storage.util.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.streams.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-10 18:03:18 +02:00
|
|
|
[mypy-synapse.util.batching_queue]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-06 12:20:49 +02:00
|
|
|
[mypy-synapse.util.caches.cached_call]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-10 18:03:18 +02:00
|
|
|
[mypy-synapse.util.caches.dictionary_cache]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-06 12:20:49 +02:00
|
|
|
[mypy-synapse.util.caches.lrucache]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.caches.response_cache]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.caches.stream_change_cache]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.caches.ttl_cache]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.daemonize]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-10 18:03:18 +02:00
|
|
|
[mypy-synapse.util.file_consumer]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.frozenutils]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.hash]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.httpresourcetree]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.iterutils]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.linked_list]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.logcontext]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.logformatter]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.macaroons]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.manhole]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.module_loader]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.msisdn]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-06 12:20:49 +02:00
|
|
|
[mypy-synapse.util.patch_inline_callbacks]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-10 18:03:18 +02:00
|
|
|
[mypy-synapse.util.ratelimitutils]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.retryutils]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.rlimit]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.stringutils]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.templates]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.threepids]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.util.wheel_timer]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-06 12:20:49 +02:00
|
|
|
[mypy-synapse.util.versionstring]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-30 12:04:40 +02:00
|
|
|
[mypy-tests.handlers.test_user_directory]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-tests.storage.test_user_directory]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
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,
|
|
|
|
;; which we can pull in as a dev dependency by adding to `setup.py`'s
|
|
|
|
;; `CONDITIONAL_REQUIREMENTS["mypy"]` 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
|
|
|
|
|
2020-10-28 16:12:21 +01:00
|
|
|
[mypy-bcrypt]
|
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-canonicaljson]
|
2019-09-12 18:29:55 +02:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-constantly]
|
2019-09-12 18:29:55 +02:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-daemonize]
|
2019-09-12 18:29:55 +02:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
|
|
|
[mypy-h11]
|
|
|
|
ignore_missing_imports = True
|
2020-12-29 23:42:10 +01:00
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-hiredis]
|
2019-09-12 18:29:55 +02:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-hyperlink]
|
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-jaeger_client.*]
|
2019-09-12 18:29:55 +02:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-josepy.*]
|
2019-09-12 18:29:55 +02:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-jwt.*]
|
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-10-08 15:49:41 +02:00
|
|
|
[mypy-nacl.*]
|
2019-10-10 10:39:35 +02:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-netaddr]
|
2019-10-10 10:39:35 +02:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-opentracing]
|
2019-10-10 10:39:35 +02:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-phonenumbers.*]
|
2019-10-10 10:39:35 +02:00
|
|
|
ignore_missing_imports = True
|
2020-01-20 18:38:21 +01:00
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-prometheus_client.*]
|
2020-01-20 18:38:21 +01:00
|
|
|
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-sentry_sdk]
|
2020-08-12 16:05:50 +02:00
|
|
|
ignore_missing_imports = True
|
2020-10-02 10:57:12 +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
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-signedjson.*]
|
2021-01-26 16:50:21 +01:00
|
|
|
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
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-twisted.*]
|
2021-05-24 21:32:01 +02:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 15:49:41 +02:00
|
|
|
[mypy-zope]
|
2021-05-20 17:11:48 +02:00
|
|
|
ignore_missing_imports = True
|