diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-04-17 14:49:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 14:49:55 +0100 |
commit | 67ff7b8ba0d3647f3c370341dff3f035b3a1160a (patch) | |
tree | 3a4bed20db43138a514ea1ff06d7d0bf1f584891 /changelog.d/7291.misc | |
parent | Clarify the comments for media_storage_providers options (#7272) (diff) | |
download | synapse-67ff7b8ba0d3647f3c370341dff3f035b3a1160a.tar.xz |
Improve type checking in `replication.tcp.Stream` (#7291)
The general idea here is to get rid of the type: ignore annotations on all of the current_token and update_function assignments, which would have caught #7290. After a bit of experimentation, it seems like the least-awful way to do this is to pass the offending functions in as parameters to the Stream constructor. Unfortunately that means that the concrete implementations no longer have the same constructor signature as Stream itself, which means that it gets hard to correctly annotate STREAMS_MAP. I've also introduced a couple of new types, to take out some duplication.
Diffstat (limited to 'changelog.d/7291.misc')
-rw-r--r-- | changelog.d/7291.misc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/7291.misc b/changelog.d/7291.misc new file mode 100644 index 0000000000..02e7ae3fa2 --- /dev/null +++ b/changelog.d/7291.misc @@ -0,0 +1 @@ +Improve typing annotations in `synapse.replication.tcp.streams.Stream`. |