forked-synapse/synapse/replication/tcp
Richard van der Hoff 67ff7b8ba0
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.
2020-04-17 14:49:55 +01:00
..
streams Improve type checking in replication.tcp.Stream (#7291) 2020-04-17 14:49:55 +01:00
__init__.py Move client command handling out of TCP protocol (#7185) 2020-04-06 09:58:42 +01:00
client.py Move client command handling out of TCP protocol (#7185) 2020-04-06 09:58:42 +01:00
commands.py Fix warnings about not calling superclass constructor 2020-04-07 17:40:22 +01:00
handler.py Remove vestigal references to SYNC replication command 2020-04-07 17:40:07 +01:00
protocol.py Handle one-word replication commands correctly 2020-04-07 17:43:46 +01:00
resource.py Move server command handling out of TCP protocol (#7187) 2020-04-07 10:51:07 +01:00