diff options
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | 2023-08-29 09:41:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-29 09:41:43 -0400 |
commit | 001fc7bd199b335f628908a0c91e44967cef2c2b (patch) | |
tree | 6c4c082742b5a115da98f6d40d8a1030a981468b /synapse/config | |
parent | Support IPv6-only SMTP servers (#16155) (diff) | |
download | synapse-001fc7bd199b335f628908a0c91e44967cef2c2b.tar.xz |
Bump ruff from 0.0.277 to 0.0.286 (#16198)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/_base.py | 8 | ||||
-rw-r--r-- | synapse/config/appservice.py | 2 |
2 files changed, 5 insertions, 5 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 diff --git a/synapse/config/appservice.py b/synapse/config/appservice.py index 919f81a9b7..a70dfbf41f 100644 --- a/synapse/config/appservice.py +++ b/synapse/config/appservice.py @@ -34,7 +34,7 @@ class AppServiceConfig(Config): def read_config(self, config: JsonDict, **kwargs: Any) -> None: self.app_service_config_files = config.get("app_service_config_files", []) if not isinstance(self.app_service_config_files, list) or not all( - type(x) is str for x in self.app_service_config_files + isinstance(x, str) for x in self.app_service_config_files ): raise ConfigError( "Expected '%s' to be a list of AS config files:" |