2019-09-12 19:29:55 +03:00
|
|
|
[mypy]
|
2019-10-31 18:43:24 +03:00
|
|
|
namespace_packages = True
|
2020-09-03 17:38:32 +03:00
|
|
|
plugins = 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
|
2021-03-26 19:49:46 +03:00
|
|
|
local_partial_types = True
|
2021-04-05 16:10:18 +03:00
|
|
|
no_implicit_optional = True
|
2020-12-18 01:58:00 +03: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 16:59:37 +03:00
|
|
|
files =
|
2020-11-24 15:53:00 +03:00
|
|
|
scripts-dev/sign_json,
|
2021-10-28 16:14:42 +03:00
|
|
|
synapse/__init__.py,
|
2020-08-26 16:59:37 +03:00
|
|
|
synapse/api,
|
|
|
|
synapse/appservice,
|
|
|
|
synapse/config,
|
2021-01-04 18:04:50 +03:00
|
|
|
synapse/crypto,
|
2020-08-26 16:59:37 +03:00
|
|
|
synapse/event_auth.py,
|
2021-11-02 16:55:52 +03:00
|
|
|
synapse/events,
|
2020-08-26 16:59:37 +03:00
|
|
|
synapse/federation,
|
2021-02-17 16:41:47 +03:00
|
|
|
synapse/groups,
|
2021-01-28 16:34:19 +03:00
|
|
|
synapse/handlers,
|
2021-10-28 16:14:42 +03:00
|
|
|
synapse/http,
|
2020-09-08 23:50:51 +03:00
|
|
|
synapse/logging,
|
2020-08-26 16:59:37 +03:00
|
|
|
synapse/metrics,
|
|
|
|
synapse/module_api,
|
|
|
|
synapse/notifier.py,
|
2020-12-11 19:43:53 +03:00
|
|
|
synapse/push,
|
2020-08-26 16:59:37 +03:00
|
|
|
synapse/replication,
|
|
|
|
synapse/rest,
|
|
|
|
synapse/server.py,
|
|
|
|
synapse/server_notices,
|
|
|
|
synapse/spam_checker_api,
|
|
|
|
synapse/state,
|
2020-12-30 16:09:53 +03:00
|
|
|
synapse/storage/__init__.py,
|
|
|
|
synapse/storage/_base.py,
|
|
|
|
synapse/storage/background_updates.py,
|
2020-10-28 18:12:21 +03:00
|
|
|
synapse/storage/databases/main/appservice.py,
|
2021-10-12 15:50:34 +03:00
|
|
|
synapse/storage/databases/main/client_ips.py,
|
2020-09-11 14:22:55 +03:00
|
|
|
synapse/storage/databases/main/events.py,
|
2021-01-04 18:04:50 +03:00
|
|
|
synapse/storage/databases/main/keys.py,
|
2020-12-16 19:25:30 +03:00
|
|
|
synapse/storage/databases/main/pusher.py,
|
2020-10-22 13:56:58 +03:00
|
|
|
synapse/storage/databases/main/registration.py,
|
2021-10-28 21:35:12 +03:00
|
|
|
synapse/storage/databases/main/relations.py,
|
2021-08-24 15:14:03 +03:00
|
|
|
synapse/storage/databases/main/session.py,
|
2020-09-02 19:52:38 +03:00
|
|
|
synapse/storage/databases/main/stream.py,
|
2020-08-26 16:59:37 +03:00
|
|
|
synapse/storage/databases/main/ui_auth.py,
|
2021-09-15 16:54:13 +03:00
|
|
|
synapse/storage/databases/state,
|
2020-08-26 16:59:37 +03:00
|
|
|
synapse/storage/database.py,
|
|
|
|
synapse/storage/engines,
|
2020-12-30 16:09:53 +03:00
|
|
|
synapse/storage/keys.py,
|
2020-09-11 14:22:55 +03:00
|
|
|
synapse/storage/persist_events.py,
|
2020-12-30 16:09:53 +03: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 16:59:37 +03:00
|
|
|
synapse/storage/state.py,
|
2020-12-30 16:09:53 +03:00
|
|
|
synapse/storage/types.py,
|
2020-08-26 16:59:37 +03:00
|
|
|
synapse/storage/util,
|
|
|
|
synapse/streams,
|
|
|
|
synapse/types.py,
|
2021-09-10 19:03:18 +03:00
|
|
|
synapse/util,
|
2021-03-24 13:49:01 +03:00
|
|
|
synapse/visibility.py,
|
2020-08-26 16:59:37 +03:00
|
|
|
tests/replication,
|
2021-07-14 16:13:40 +03:00
|
|
|
tests/test_event_auth.py,
|
2020-08-26 16:59:37 +03:00
|
|
|
tests/test_utils,
|
2020-12-01 14:10:42 +03:00
|
|
|
tests/handlers/test_password_providers.py,
|
2021-09-06 13:37:54 +03:00
|
|
|
tests/handlers/test_room.py,
|
2021-08-16 17:49:12 +03:00
|
|
|
tests/handlers/test_room_summary.py,
|
2021-08-27 18:33:41 +03:00
|
|
|
tests/handlers/test_send_email.py,
|
2021-08-19 18:12:55 +03:00
|
|
|
tests/handlers/test_sync.py,
|
2021-09-24 12:38:22 +03:00
|
|
|
tests/handlers/test_user_directory.py,
|
2021-08-20 19:50:44 +03:00
|
|
|
tests/rest/client/test_login.py,
|
|
|
|
tests/rest/client/test_auth.py,
|
2021-10-14 16:19:35 +03:00
|
|
|
tests/rest/client/test_relations.py,
|
2021-10-12 20:19:35 +03:00
|
|
|
tests/rest/media/v1/test_filepath.py,
|
2021-10-13 14:00:07 +03:00
|
|
|
tests/rest/media/v1/test_oembed.py,
|
2021-09-14 18:35:53 +03:00
|
|
|
tests/storage/test_state.py,
|
2021-09-24 12:38:22 +03:00
|
|
|
tests/storage/test_user_directory.py,
|
2021-05-24 22:32:01 +03:00
|
|
|
tests/util/test_itertools.py,
|
2020-08-26 16:59:37 +03:00
|
|
|
tests/util/test_stream_change_cache.py
|
2019-09-12 19:29:55 +03:00
|
|
|
|
2021-10-18 22:01:10 +03:00
|
|
|
[mypy-synapse.api.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-21 16:07:07 +03:00
|
|
|
[mypy-synapse.crypto.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-13 14:24:07 +03:00
|
|
|
[mypy-synapse.events.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-20 15:56:23 +03:00
|
|
|
[mypy-synapse.handlers.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-11 19:42:10 +03:00
|
|
|
[mypy-synapse.push.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-15 15:45:32 +03:00
|
|
|
[mypy-synapse.rest.*]
|
2021-09-03 16:22:22 +03:00
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-07 21:55:15 +03:00
|
|
|
[mypy-synapse.server_notices.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-06 20:55:25 +03:00
|
|
|
[mypy-synapse.state.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-12 15:50:34 +03:00
|
|
|
[mypy-synapse.storage.databases.main.client_ips]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-08 17:25:16 +03:00
|
|
|
[mypy-synapse.storage.util.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.streams.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-10 19:03:18 +03:00
|
|
|
[mypy-synapse.util.batching_queue]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-06 13:20:49 +03:00
|
|
|
[mypy-synapse.util.caches.cached_call]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-10 19:03:18 +03:00
|
|
|
[mypy-synapse.util.caches.dictionary_cache]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-06 13:20:49 +03: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 19:03:18 +03: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 13:20:49 +03:00
|
|
|
[mypy-synapse.util.patch_inline_callbacks]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-10 19:03:18 +03: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 13:20:49 +03:00
|
|
|
[mypy-synapse.util.versionstring]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-30 13:04:40 +03:00
|
|
|
[mypy-tests.handlers.test_user_directory]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-tests.storage.test_user_directory]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
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,
|
|
|
|
;; which we can pull in as a dev dependency by adding to `setup.py`'s
|
|
|
|
;; `CONDITIONAL_REQUIREMENTS["mypy"]` 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
|
|
|
|
|
2020-10-28 18:12:21 +03:00
|
|
|
[mypy-bcrypt]
|
|
|
|
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-constantly]
|
2019-09-12 19:29:55 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-daemonize]
|
2019-09-12 19:29:55 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
|
|
|
[mypy-h11]
|
|
|
|
ignore_missing_imports = True
|
2020-12-30 01:42:10 +03:00
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-hiredis]
|
2019-09-12 19:29:55 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-hyperlink]
|
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-jaeger_client.*]
|
2019-09-12 19:29:55 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-josepy.*]
|
2019-09-12 19:29:55 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-jwt.*]
|
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
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-nacl.*]
|
2019-10-10 11:39:35 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-netaddr]
|
2019-10-10 11:39:35 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-opentracing]
|
2019-10-10 11:39:35 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-phonenumbers.*]
|
2019-10-10 11:39:35 +03:00
|
|
|
ignore_missing_imports = True
|
2020-01-20 20:38:21 +03:00
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-prometheus_client.*]
|
2020-01-20 20:38:21 +03:00
|
|
|
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-sentry_sdk]
|
2020-08-12 17:05:50 +03:00
|
|
|
ignore_missing_imports = True
|
2020-10-02 11:57:12 +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
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-signedjson.*]
|
2021-01-26 18:50:21 +03:00
|
|
|
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
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-twisted.*]
|
2021-05-24 22:32:01 +03:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 16:49:41 +03:00
|
|
|
[mypy-zope]
|
2021-05-20 18:11:48 +03:00
|
|
|
ignore_missing_imports = True
|