From da1f804aa05597eea9d83e0f53c861c5cadc9911 Mon Sep 17 00:00:00 2001 From: Azrenbeth <7782548+Azrenbeth@users.noreply.github.com> Date: Mon, 20 Sep 2021 16:50:17 +0100 Subject: Run linters --- docs/sample_config.yaml | 2 +- synapse/config/state_compressor.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml index 33ed943713..947eea3400 100644 --- a/docs/sample_config.yaml +++ b/docs/sample_config.yaml @@ -2665,7 +2665,7 @@ state_compressor: # The (rough) number of state groups to load at one time. Defaults # to 500. # - #chunk_size: 1000 + #chunk_size: 1000 # The number of rooms to compress on each run. Defaults to 5. # diff --git a/synapse/config/state_compressor.py b/synapse/config/state_compressor.py index 7a2040ae0b..d9c1b7e46a 100644 --- a/synapse/config/state_compressor.py +++ b/synapse/config/state_compressor.py @@ -22,7 +22,9 @@ class StateCompressorConfig(Config): def read_config(self, config, **kwargs): compressor_config = config.get("state_compressor") or {} - validate_config(_STATE_COMPRESSOR_SCHEMA, compressor_config, ("state_compressor",)) + validate_config( + _STATE_COMPRESSOR_SCHEMA, compressor_config, ("state_compressor",) + ) self.compressor_enabled = compressor_config.get("enabled") or False if not self.compressor_enabled: @@ -31,7 +33,7 @@ class StateCompressorConfig(Config): try: check_requirements("auto_compressor") except DependencyException as e: - raise ConfigError(e.message) + raise ConfigError from e self.compressor_chunk_size = compressor_config.get("chunk_size") or 500 self.compressor_number_of_rooms = compressor_config.get("number_of_rooms") or 5 @@ -63,7 +65,7 @@ class StateCompressorConfig(Config): # The (rough) number of state groups to load at one time. Defaults # to 500. # - #chunk_size: 1000 + #chunk_size: 1000 # The number of rooms to compress on each run. Defaults to 5. # -- cgit 1.5.1