summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-02-13 11:29:37 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-02-13 11:30:15 +0000
commit28eba8747eb0a5f88f7bb96b93ef43c12d53b9de (patch)
treeab19276f5d3334627f606019d165807396b107d1 /synapse/util
parentDinsic Blacking with black==18.6b2 (diff)
parentRun Black. (#5482) (diff)
downloadsynapse-28eba8747eb0a5f88f7bb96b93ef43c12d53b9de.tar.xz
Run Black. (#5482)
Diffstat (limited to 'synapse/util')
-rw-r--r--synapse/util/caches/response_cache.py2
-rw-r--r--synapse/util/logcontext.py4
-rw-r--r--synapse/util/stringutils.py2
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))