matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.82k stars 2.13k forks source link

Fix cyclic imports in Synapse #11176

Open squahtx opened 3 years ago

squahtx commented 3 years ago

Cyclic imports can cause unit tests to fail when run in isolation, or CI for Synapse modules to fail: https://github.com/matrix-org/synapse-email-account-validity/runs/3979337154?check_suite_focus=true

A full list can be obtained using pylint --disable=all --enable R0401 synapse (thanks to @DMRobertson)

As of 85a09f8b8ba7c8023c0d28a526d32111fc704197, the current list of cyclic imports is:

************* Module synapse.rest.admin.media
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.crypto.event_signing -> synapse.events.utils -> synapse.events) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.crypto.event_signing -> synapse.events) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_directory -> synapse.storage.databases.main.state -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.storage.databases.main -> synapse.storage.databases.main.purge_events) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.transactions -> synapse.storage.databases.main.cache -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.databases -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.ui_auth -> synapse.handlers.ui_auth.checkers) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.event_auth -> synapse.events.builder -> synapse.state -> synapse.state.v1) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.notifier -> synapse.server) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.rest.media.v1.oembed -> synapse.rest.media.v1.preview_url_resource) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.storage.util.id_generators -> synapse.storage.util.sequence -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.databases -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.persist_events -> synapse.state -> synapse.state.v1 -> synapse.event_auth -> synapse.events.builder -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.state -> synapse.state.v2) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.api.urls -> synapse.config.homeserver -> synapse.config.logger -> synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.rest.client.login -> synapse.rest.client._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.api.ratelimiting -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger -> synapse.app._base -> synapse.handlers.auth) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.api.ratelimiting -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage.databases.main.events_worker -> synapse.storage.util.id_generators -> synapse.storage.util.sequence -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger -> synapse.app._base -> synapse.handlers.auth) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.api.ratelimiting -> synapse.storage.databases.main -> synapse.config.homeserver -> synapse.config.logger -> synapse.app._base -> synapse.handlers.auth) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.transactions -> synapse.storage.databases.main.cache -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.rest.admin -> synapse.rest.admin.server_notice_servlet) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_directory -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.purge_events -> synapse.storage.databases.main.state -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.persist_events -> synapse.state -> synapse.state.v2 -> synapse.event_auth -> synapse.events.builder -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.registration -> synapse.storage.databases.main.cache -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.api.ratelimiting -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger -> synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.rest.client.login) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.crypto.context_factory -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.directory -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.purge_events -> synapse.storage.databases -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.storage._base -> synapse.storage.database -> synapse.storage.background_updates) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.persist_events -> synapse.storage.databases -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.storage.engines -> synapse.storage.engines.sqlite) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.receipts -> synapse.replication.slave.storage._slaved_id_tracker -> synapse.storage.util.id_generators -> synapse.storage.util.sequence -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.events_bg_updates -> synapse.storage.databases.main.events -> synapse.storage.util.sequence -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.databases -> synapse.storage.databases.state -> synapse.storage.databases.state.store -> synapse.storage.databases.state.bg_updates -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.databases -> synapse.storage.databases.state -> synapse.storage.databases.state.store -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.stats -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.events_forward_extremities -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.ui_auth -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.events_bg_updates -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_erasure_store -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.room -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.deviceinbox -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_directory -> synapse.storage.databases.main.state -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.profile -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.relations -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.event_push_actions -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.push_rule -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.keys -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.databases -> synapse.storage.databases.state -> synapse.storage.databases.state.store -> synapse.storage.databases.state.bg_updates -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.room -> synapse.storage.databases.main.search -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.events_bg_updates -> synapse.storage.databases.main.events -> synapse.storage.databases.main.search -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.databases -> synapse.storage.databases.main.events -> synapse.storage.databases.main.search -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_directory -> synapse.storage.databases.main.state_deltas -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.lock -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.room_batch -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.transactions -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.cache -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.client_ips -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.relations -> synapse.storage.databases.main.stream -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.presence -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.room -> synapse.storage.databases.main.search -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_directory -> synapse.storage.databases.main.state -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.user_directory -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.push_rule -> synapse.storage.databases.main.pusher -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.profile -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.monthly_active_users -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.openid -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.filtering -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.media_repository -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.push_rule -> synapse.storage.databases.main.appservice -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.censor_events -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.devices -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.metrics -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.event_federation -> synapse.storage.databases.main.signatures -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.tags -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.e2e_room_keys -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.account_data -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.group_server -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.receipts -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.rejections -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.session -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage -> synapse.storage.persist_events -> synapse.state -> synapse.state.v1 -> synapse.event_auth -> synapse.events.builder -> synapse.storage.databases.main -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.events_bg_updates -> synapse.storage.databases.main.events -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.end_to_end_keys -> synapse.storage._base -> synapse.storage.database -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.federation -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.handlers.presence -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams._base) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.storage.databases.main.roommember -> synapse.storage.databases.main.events_worker -> synapse.replication.tcp.streams -> synapse.replication.tcp.streams.events -> synapse.replication.tcp.streams._base -> synapse.handlers.presence -> synapse.storage.databases.main -> synapse.storage.databases.main.receipts -> synapse.storage.util.id_generators -> synapse.storage.util.sequence -> synapse.storage.engines -> synapse.storage.engines.sqlite -> synapse.storage.prepare_database -> synapse.config.homeserver -> synapse.config.logger) (cyclic-import)
synapse/rest/admin/media.py:1:0: R0401: Cyclic import (synapse.api.urls -> synapse.config.homeserver -> synapse.config.logger -> synapse.app._base -> synapse.handlers.auth -> synapse.module_api -> synapse.rest.client.login) (cyclic-import)

------------------------------------------------------------------
Your code has been rated at 9.98/10 (previous run: 9.99/10, -0.00)
DMRobertson commented 3 years ago

Also suggest we make this a CI check, assuming it's not too expensive to run.

richvdh commented 2 years ago

Really, we should have better rules about what is allowed to import from where. For example: synapse.handlers is not allowed to import from synapse.rest. Currently, it's all rather ad-hoc.

dklimpel commented 1 year ago

I did a test today and got only failures in one file: ************* Module synapse.spam_checker_api.__init__ Your code has been rated at 9.99/10

DMRobertson commented 1 year ago

Really, we should have better rules about what is allowed to import from where. For example: synapse.handlers is not allowed to import from synapse.rest. Currently, it's all rather ad-hoc.

Something like https://github.com/seddonym/import-linter/ might help enforce this sort of rule.

DMRobertson commented 1 year ago

(I had https://sourcery.ai/blog/dependency-rules/ in mind having previously seen it on https://news.ycombinator.com/item?id=33999191, but this seems to be some kind of paid for product?)