summary refs log tree commit diff
path: root/changelog.d
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-04-17 14:49:55 +0100
committerGitHub <noreply@github.com>2020-04-17 14:49:55 +0100
commit67ff7b8ba0d3647f3c370341dff3f035b3a1160a (patch)
tree3a4bed20db43138a514ea1ff06d7d0bf1f584891 /changelog.d
parentClarify the comments for media_storage_providers options (#7272) (diff)
downloadsynapse-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')
-rw-r--r--changelog.d/7291.misc1
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`.