diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-02-13 11:29:37 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-02-13 11:30:15 +0000 |
commit | 28eba8747eb0a5f88f7bb96b93ef43c12d53b9de (patch) | |
tree | ab19276f5d3334627f606019d165807396b107d1 /synapse/util | |
parent | Dinsic Blacking with black==18.6b2 (diff) | |
parent | Run Black. (#5482) (diff) | |
download | synapse-28eba8747eb0a5f88f7bb96b93ef43c12d53b9de.tar.xz |
Run Black. (#5482)
Diffstat (limited to 'synapse/util')
-rw-r--r-- | synapse/util/caches/response_cache.py | 2 | ||||
-rw-r--r-- | synapse/util/logcontext.py | 4 | ||||
-rw-r--r-- | synapse/util/stringutils.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/synapse/util/caches/response_cache.py b/synapse/util/caches/response_cache.py index e493d07b55..b1da81633c 100644 --- a/synapse/util/caches/response_cache.py +++ b/synapse/util/caches/response_cache.py @@ -35,7 +35,7 @@ class ResponseCache(object): self.pending_result_cache = {} # Requests that haven't finished yet. self.clock = hs.get_clock() - self.timeout_sec = timeout_ms / 1000. + self.timeout_sec = timeout_ms / 1000.0 self._name = name self._metrics = register_cache("response_cache", name, self) diff --git a/synapse/util/logcontext.py b/synapse/util/logcontext.py index 413b4aa060..a9885cb507 100644 --- a/synapse/util/logcontext.py +++ b/synapse/util/logcontext.py @@ -96,8 +96,8 @@ class ContextResourceUsage(object): return ContextResourceUsage(copy_from=self) def reset(self): - self.ru_stime = 0. - self.ru_utime = 0. + self.ru_stime = 0.0 + self.ru_utime = 0.0 self.db_txn_count = 0 self.db_txn_duration_sec = 0 diff --git a/synapse/util/stringutils.py b/synapse/util/stringutils.py index 31762e095d..6a2464cab3 100644 --- a/synapse/util/stringutils.py +++ b/synapse/util/stringutils.py @@ -106,7 +106,7 @@ def exception_to_unicode(e): # and instead look at what is in the args member. if len(e.args) == 0: - return u"" + return "" elif len(e.args) > 1: return six.text_type(repr(e.args)) |