ruff: Fix SIM118 Use key in dict instead of key in dict.keys().

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-12-11 18:39:16 -08:00
committed by Tim Abbott
parent a6442288cf
commit e1ed44907b
22 changed files with 27 additions and 27 deletions

View File

@@ -1627,7 +1627,7 @@ def parse_message_content_edit_or_delete_limit(
*,
setting_name: str,
) -> Optional[int]:
if isinstance(value, str) and value in special_values_map.keys():
if isinstance(value, str) and value in special_values_map:
return special_values_map[value]
if isinstance(value, str) or value <= 0:
raise RequestVariableConversionError(setting_name, value)