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/push | |
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/push')
-rw-r--r-- | synapse/push/bulk_push_rule_evaluator.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/push/bulk_push_rule_evaluator.py b/synapse/push/bulk_push_rule_evaluator.py index 990c079c81..554634579e 100644 --- a/synapse/push/bulk_push_rule_evaluator.py +++ b/synapse/push/bulk_push_rule_evaluator.py @@ -379,7 +379,7 @@ class BulkPushRuleEvaluator: keys = list(notification_levels.keys()) for key in keys: level = notification_levels.get(key, SENTINEL) - if level is not SENTINEL and type(level) is not int: + if level is not SENTINEL and type(level) is not int: # noqa: E721 try: notification_levels[key] = int(level) except (TypeError, ValueError): @@ -472,7 +472,11 @@ StateGroup = Union[object, int] def _is_simple_value(value: Any) -> bool: - return isinstance(value, (bool, str)) or type(value) is int or value is None + return ( + isinstance(value, (bool, str)) + or type(value) is int # noqa: E721 + or value is None + ) def _flatten_dict( |