From 363565e6ac803c92786d46e29badfd342e4dfa76 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Tue, 21 Sep 2021 15:36:50 +0100 Subject: [PATCH] Add a stub implementation of `StateFilter.approx_difference` --- synapse/storage/state.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/synapse/storage/state.py b/synapse/storage/state.py index 5e86befde4..806b0016d9 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -193,6 +193,14 @@ class StateFilter: include_others=True, ) + def approx_difference(self, subtrahend: "StateFilter") -> "StateFilter": + """ + Stub implementation! Satisfies the condition that it's an overestimate. + """ + if self == subtrahend: + return StateFilter.none() + return self + def make_sql_filter_clause(self) -> Tuple[str, List[str]]: """Converts the filter to an SQL clause.