summary refs log tree commit diff
diff options
context:
space:
mode:
authorAzrenbeth <7782548+Azrenbeth@users.noreply.github.com>2021-09-20 16:50:17 +0100
committerAzrenbeth <7782548+Azrenbeth@users.noreply.github.com>2021-09-20 16:50:17 +0100
commitda1f804aa05597eea9d83e0f53c861c5cadc9911 (patch)
treee1277e55f6207eb67e055d072672df07eacd6bae
parentAdd TODO in state compressor docs for when auto_compressor docs merged (diff)
downloadsynapse-da1f804aa05597eea9d83e0f53c861c5cadc9911.tar.xz
Run linters
-rw-r--r--docs/sample_config.yaml2
-rw-r--r--synapse/config/state_compressor.py8
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.
           #