From cc1dd98362fad83a206e23a3f3fd75d4664fc5de Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 3 Apr 2020 18:09:55 +0100 Subject: [PATCH] lint --- synapse/config/cache.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/synapse/config/cache.py b/synapse/config/cache.py index 741e3dae78..bd9c5e5aaa 100644 --- a/synapse/config/cache.py +++ b/synapse/config/cache.py @@ -25,7 +25,6 @@ _CACHE_PREFIX = "SYNAPSE_CACHE_FACTOR" CACHE_PROPERTIES = { "prefix": _CACHE_PREFIX, "default_size_factor": float(os.environ.get(_CACHE_PREFIX, 0.5)), - # Callback to ensure that all caches are the correct size, registered when the # configuration has been loaded. "ensure_correct_cache_sizing": None, @@ -48,7 +47,9 @@ class CacheConfig(Config): Used for tests. """ - CACHE_PROPERTIES["default_size_factor"] = float(os.environ.get(_CACHE_PREFIX, 0.5)) + CACHE_PROPERTIES["default_size_factor"] = float( + os.environ.get(_CACHE_PREFIX, 0.5) + ) CACHE_PROPERTIES["ensure_correct_cache_sizing"] = None _CACHES.clear() @@ -86,7 +87,7 @@ class CacheConfig(Config): # Load cache factors from the environment, but override them with the # ones in the config file if they exist individual_factors = { - key[len(CACHE_PROPERTIES["prefix"]) + 1:].lower(): float(val) + key[len(CACHE_PROPERTIES["prefix"]) + 1 :].lower(): float(val) for key, val in self._environ.items() if key.startswith(CACHE_PROPERTIES["prefix"] + "_") }