Expand synapse.module_api.__all__ to include more of the publicly exposed types/helpers (#20107)

I *think* the intention is that `__all__` can be used to access all the
types that are exposed via the module API. However, some of them are
missing.

This PR adds those that are directly referenced but were not exposed.
There are some others that are indirectly referenced that I've not
included (e.g. `synapse.spam_checker_api.RegistrationBehaviour`).
This commit is contained in:
Hugh Nimmo-Smith
2026-08-27 14:42:41 +01:00
committed by GitHub
parent c246d81dec
commit d9f3a9d4fa
2 changed files with 14 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
Declare types that already appear in the module API's public signatures (such as `Requester`, `SynapseRequest` and `UserInfo`) in `synapse.module_api.__all__`.
+13
View File
@@ -194,14 +194,21 @@ __all__ = [
"run_in_background",
"run_as_background_process",
"cached",
"CachedFunction",
"NOT_SPAM",
"UserID",
"DomainSpecificString",
"DatabasePool",
"LoggingTransaction",
"DirectServeHtmlResource",
"DirectServeJsonResource",
"SimpleHttpClient",
"SynapseRequest",
"ModuleApi",
"AccountDataManager",
"PublicRoomListManager",
"PRESENCE_ALL_USERS",
"UserPresenceState",
"LoginResponse",
"JsonDict",
"JsonMapping",
@@ -209,7 +216,13 @@ __all__ = [
"StateMap",
"ProfileInfo",
"RoomAlias",
"RoomID",
"Requester",
"UserInfo",
"UserIpAndAgent",
"UserProfile",
"Absent",
"AbsentType",
"RatelimitOverride",
"MediaUploadLimit",
]