summary refs log tree commit diff
path: root/synapse/config/_base.py
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2023-09-05 14:40:53 +0100
committerDavid Robertson <davidr@element.io>2023-09-05 14:40:53 +0100
commit0e8cbbdb8eb5140a8563f389b11444e150967589 (patch)
treea6fda197186c02bf0c852ea611287a5e3b3a0210 /synapse/config/_base.py
parentMerge remote-tracking branch 'origin/release-v1.91' into matrix-org-hotfixes (diff)
parentUpdate changelog (diff)
downloadsynapse-0e8cbbdb8eb5140a8563f389b11444e150967589.tar.xz
Merge remote-tracking branch 'origin/release-v1.92' into matrix-org-hotfixes
Diffstat (limited to 'synapse/config/_base.py')
-rw-r--r--synapse/config/_base.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/config/_base.py b/synapse/config/_base.py

index 1d268a1817..69a8318127 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py
@@ -186,9 +186,9 @@ class Config: TypeError, if given something other than an integer or a string ValueError: if given a string not of the form described above. """ - if type(value) is int: + if type(value) is int: # noqa: E721 return value - elif type(value) is str: + elif isinstance(value, str): sizes = {"K": 1024, "M": 1024 * 1024} size = 1 suffix = value[-1] @@ -218,9 +218,9 @@ class Config: TypeError, if given something other than an integer or a string ValueError: if given a string not of the form described above. """ - if type(value) is int: + if type(value) is int: # noqa: E721 return value - elif type(value) is str: + elif isinstance(value, str): second = 1000 minute = 60 * second hour = 60 * minute