2019-09-12 12:29:55 -04:00
|
|
|
[mypy]
|
2019-10-31 11:43:24 -04:00
|
|
|
namespace_packages = True
|
2020-09-03 10:38:32 -04:00
|
|
|
plugins = mypy_zope:plugin, scripts-dev/mypy_synapse_plugin.py
|
2021-03-26 12:49:46 -04:00
|
|
|
follow_imports = normal
|
2019-10-31 11:43:24 -04:00
|
|
|
check_untyped_defs = True
|
|
|
|
show_error_codes = True
|
|
|
|
show_traceback = True
|
|
|
|
mypy_path = stubs
|
2020-10-01 08:09:18 -04:00
|
|
|
warn_unreachable = True
|
2021-03-26 12:49:46 -04:00
|
|
|
local_partial_types = True
|
2021-04-05 09:10:18 -04:00
|
|
|
no_implicit_optional = True
|
2020-12-17 17:58:00 -05: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 09:59:37 -04:00
|
|
|
files =
|
2020-11-24 07:53:00 -05:00
|
|
|
scripts-dev/sign_json,
|
2020-08-26 09:59:37 -04:00
|
|
|
synapse/api,
|
|
|
|
synapse/appservice,
|
|
|
|
synapse/config,
|
2021-01-04 10:04:50 -05:00
|
|
|
synapse/crypto,
|
2020-08-26 09:59:37 -04:00
|
|
|
synapse/event_auth.py,
|
|
|
|
synapse/events/builder.py,
|
2021-10-13 07:24:07 -04:00
|
|
|
synapse/events/presence_router.py,
|
|
|
|
synapse/events/snapshot.py,
|
2020-08-26 09:59:37 -04:00
|
|
|
synapse/events/spamcheck.py,
|
2021-03-24 06:49:01 -04:00
|
|
|
synapse/events/third_party_rules.py,
|
2021-10-13 07:24:07 -04:00
|
|
|
synapse/events/utils.py,
|
2021-03-24 06:49:01 -04:00
|
|
|
synapse/events/validator.py,
|
2020-08-26 09:59:37 -04:00
|
|
|
synapse/federation,
|
2021-02-17 08:41:47 -05:00
|
|
|
synapse/groups,
|
2021-01-28 08:34:19 -05:00
|
|
|
synapse/handlers,
|
2021-08-18 13:53:20 -04:00
|
|
|
synapse/http/additional_resource.py,
|
2020-11-25 13:30:47 -05:00
|
|
|
synapse/http/client.py,
|
2020-11-25 07:07:21 -05:00
|
|
|
synapse/http/federation/matrix_federation_agent.py,
|
2021-08-18 13:53:20 -04:00
|
|
|
synapse/http/federation/srv_resolver.py,
|
2020-09-01 09:15:22 -04:00
|
|
|
synapse/http/federation/well_known_resolver.py,
|
2020-11-25 07:07:21 -05:00
|
|
|
synapse/http/matrixfederationclient.py,
|
2021-08-18 13:53:20 -04:00
|
|
|
synapse/http/proxyagent.py,
|
2021-06-08 08:30:48 -04:00
|
|
|
synapse/http/servlet.py,
|
2020-08-26 09:59:37 -04:00
|
|
|
synapse/http/server.py,
|
|
|
|
synapse/http/site.py,
|
2020-09-08 16:50:51 -04:00
|
|
|
synapse/logging,
|
2020-08-26 09:59:37 -04:00
|
|
|
synapse/metrics,
|
|
|
|
synapse/module_api,
|
|
|
|
synapse/notifier.py,
|
2020-12-11 11:43:53 -05:00
|
|
|
synapse/push,
|
2020-08-26 09:59:37 -04:00
|
|
|
synapse/replication,
|
|
|
|
synapse/rest,
|
|
|
|
synapse/server.py,
|
|
|
|
synapse/server_notices,
|
|
|
|
synapse/spam_checker_api,
|
|
|
|
synapse/state,
|
2020-12-30 08:09:53 -05:00
|
|
|
synapse/storage/__init__.py,
|
|
|
|
synapse/storage/_base.py,
|
|
|
|
synapse/storage/background_updates.py,
|
2020-10-28 11:12:21 -04:00
|
|
|
synapse/storage/databases/main/appservice.py,
|
2021-10-12 08:50:34 -04:00
|
|
|
synapse/storage/databases/main/client_ips.py,
|
2020-09-11 07:22:55 -04:00
|
|
|
synapse/storage/databases/main/events.py,
|
2021-01-04 10:04:50 -05:00
|
|
|
synapse/storage/databases/main/keys.py,
|
2020-12-16 11:25:30 -05:00
|
|
|
synapse/storage/databases/main/pusher.py,
|
2020-10-22 06:56:58 -04:00
|
|
|
synapse/storage/databases/main/registration.py,
|
2021-08-24 08:14:03 -04:00
|
|
|
synapse/storage/databases/main/session.py,
|
2020-09-02 12:52:38 -04:00
|
|
|
synapse/storage/databases/main/stream.py,
|
2020-08-26 09:59:37 -04:00
|
|
|
synapse/storage/databases/main/ui_auth.py,
|
2021-09-15 09:54:13 -04:00
|
|
|
synapse/storage/databases/state,
|
2020-08-26 09:59:37 -04:00
|
|
|
synapse/storage/database.py,
|
|
|
|
synapse/storage/engines,
|
2020-12-30 08:09:53 -05:00
|
|
|
synapse/storage/keys.py,
|
2020-09-11 07:22:55 -04:00
|
|
|
synapse/storage/persist_events.py,
|
2020-12-30 08:09:53 -05: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 09:59:37 -04:00
|
|
|
synapse/storage/state.py,
|
2020-12-30 08:09:53 -05:00
|
|
|
synapse/storage/types.py,
|
2020-08-26 09:59:37 -04:00
|
|
|
synapse/storage/util,
|
|
|
|
synapse/streams,
|
|
|
|
synapse/types.py,
|
2021-09-10 12:03:18 -04:00
|
|
|
synapse/util,
|
2021-03-24 06:49:01 -04:00
|
|
|
synapse/visibility.py,
|
2020-08-26 09:59:37 -04:00
|
|
|
tests/replication,
|
2021-07-14 09:13:40 -04:00
|
|
|
tests/test_event_auth.py,
|
2020-08-26 09:59:37 -04:00
|
|
|
tests/test_utils,
|
2020-12-01 06:10:42 -05:00
|
|
|
tests/handlers/test_password_providers.py,
|
2021-09-06 06:37:54 -04:00
|
|
|
tests/handlers/test_room.py,
|
2021-08-16 10:49:12 -04:00
|
|
|
tests/handlers/test_room_summary.py,
|
2021-08-27 11:33:41 -04:00
|
|
|
tests/handlers/test_send_email.py,
|
2021-08-19 11:12:55 -04:00
|
|
|
tests/handlers/test_sync.py,
|
2021-09-24 05:38:22 -04:00
|
|
|
tests/handlers/test_user_directory.py,
|
2021-08-20 12:50:44 -04:00
|
|
|
tests/rest/client/test_login.py,
|
|
|
|
tests/rest/client/test_auth.py,
|
2021-10-14 09:19:35 -04:00
|
|
|
tests/rest/client/test_relations.py,
|
2021-10-12 13:19:35 -04:00
|
|
|
tests/rest/media/v1/test_filepath.py,
|
2021-10-13 07:00:07 -04:00
|
|
|
tests/rest/media/v1/test_oembed.py,
|
2021-09-14 11:35:53 -04:00
|
|
|
tests/storage/test_state.py,
|
2021-09-24 05:38:22 -04:00
|
|
|
tests/storage/test_user_directory.py,
|
2021-05-24 15:32:01 -04:00
|
|
|
tests/util/test_itertools.py,
|
2020-08-26 09:59:37 -04:00
|
|
|
tests/util/test_stream_change_cache.py
|
2019-09-12 12:29:55 -04:00
|
|
|
|
2021-10-13 07:24:07 -04:00
|
|
|
[mypy-synapse.events.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-20 08:56:23 -04:00
|
|
|
[mypy-synapse.handlers.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-11 12:42:10 -04:00
|
|
|
[mypy-synapse.push.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-15 08:45:32 -04:00
|
|
|
[mypy-synapse.rest.*]
|
2021-09-03 09:22:22 -04:00
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-07 14:55:15 -04:00
|
|
|
[mypy-synapse.server_notices.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-06 13:55:25 -04:00
|
|
|
[mypy-synapse.state.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-12 08:50:34 -04:00
|
|
|
[mypy-synapse.storage.databases.main.client_ips]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-08 10:25:16 -04:00
|
|
|
[mypy-synapse.storage.util.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-synapse.streams.*]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-10 12:03:18 -04:00
|
|
|
[mypy-synapse.util.batching_queue]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-06 06:20:49 -04:00
|
|
|
[mypy-synapse.util.caches.cached_call]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-10 12:03:18 -04:00
|
|
|
[mypy-synapse.util.caches.dictionary_cache]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-06 06:20:49 -04: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 12:03:18 -04: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 06:20:49 -04:00
|
|
|
[mypy-synapse.util.patch_inline_callbacks]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-10 12:03:18 -04: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 06:20:49 -04:00
|
|
|
[mypy-synapse.util.versionstring]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-09-30 06:04:40 -04:00
|
|
|
[mypy-tests.handlers.test_user_directory]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
|
|
|
[mypy-tests.storage.test_user_directory]
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
|
2021-10-08 09:49:41 -04: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 12:34:13 -05:00
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-authlib.*]
|
2019-09-12 12:29:55 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2020-10-28 11:12:21 -04:00
|
|
|
[mypy-bcrypt]
|
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-canonicaljson]
|
2019-09-12 12:29:55 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-constantly]
|
2019-09-12 12:29:55 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-daemonize]
|
2019-09-12 12:29:55 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
|
|
|
[mypy-h11]
|
|
|
|
ignore_missing_imports = True
|
2020-12-29 17:42:10 -05:00
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-hiredis]
|
2019-09-12 12:29:55 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-hyperlink]
|
2019-09-12 12:29:55 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-ijson.*]
|
2019-09-12 12:29:55 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-jaeger_client.*]
|
2019-09-12 12:29:55 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-josepy.*]
|
2019-09-12 12:29:55 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-jwt.*]
|
2019-09-12 12:29:55 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-lxml]
|
2019-09-12 12:29:55 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-msgpack]
|
2019-09-12 12:29:55 -04:00
|
|
|
ignore_missing_imports = True
|
2019-10-10 04:39:35 -04:00
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-nacl.*]
|
2019-10-10 04:39:35 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-netaddr]
|
2019-10-10 04:39:35 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-opentracing]
|
2019-10-10 04:39:35 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-phonenumbers.*]
|
2019-10-10 04:39:35 -04:00
|
|
|
ignore_missing_imports = True
|
2020-01-20 12:38:21 -05:00
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-prometheus_client.*]
|
2020-01-20 12:38:21 -05:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-pymacaroons.*]
|
2020-01-20 12:38:21 -05:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-pympler.*]
|
2020-01-20 12:38:21 -05:00
|
|
|
ignore_missing_imports = True
|
2020-05-08 08:30:40 -04:00
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-rust_python_jaeger_reporter.*]
|
2020-05-08 08:30:40 -04:00
|
|
|
ignore_missing_imports = True
|
2020-06-17 09:13:41 -04:00
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-saml2.*]
|
2020-06-17 09:13:41 -04:00
|
|
|
ignore_missing_imports = True
|
2020-08-12 10:05:50 -04:00
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-sentry_sdk]
|
2020-08-12 10:05:50 -04:00
|
|
|
ignore_missing_imports = True
|
2020-10-02 04:57:12 -04:00
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-service_identity.*]
|
2020-10-02 04:57:12 -04:00
|
|
|
ignore_missing_imports = True
|
2021-01-26 10:50:21 -05:00
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-signedjson.*]
|
2021-01-26 10:50:21 -05:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-treq.*]
|
2021-05-05 11:54:36 -04:00
|
|
|
ignore_missing_imports = True
|
2021-05-20 11:11:48 -04:00
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-twisted.*]
|
2021-05-24 15:32:01 -04:00
|
|
|
ignore_missing_imports = True
|
|
|
|
|
2021-10-08 09:49:41 -04:00
|
|
|
[mypy-zope]
|
2021-05-20 11:11:48 -04:00
|
|
|
ignore_missing_imports = True
|