From c6b60044322c4b91b2292d15bdc20f80c5bc02ea Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 4 Jan 2023 22:22:44 -0800 Subject: [PATCH] =?UTF-8?q?ruff:=20Fix=20SIM111=20Use=20`return=20all(?= =?UTF-8?q?=E2=80=A6)`=20instead=20of=20`for`=20loop.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anders Kaseorg --- tools/setup/emoji/emoji_setup_utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/setup/emoji/emoji_setup_utils.py b/tools/setup/emoji/emoji_setup_utils.py index 8dc4ee3991..d8b5773bdc 100644 --- a/tools/setup/emoji/emoji_setup_utils.py +++ b/tools/setup/emoji/emoji_setup_utils.py @@ -103,10 +103,7 @@ def generate_emoji_catalog( # Use only those names for which images are present in all # the emoji sets so that we can switch emoji sets seamlessly. def emoji_is_universal(emoji_dict: Dict[str, Any]) -> bool: - for emoji_set in EMOJISETS: - if not emoji_dict["has_img_" + emoji_set]: - return False - return True + return all(emoji_dict["has_img_" + emoji_set] for emoji_set in EMOJISETS) def generate_codepoint_to_name_map(emoji_name_maps: Dict[str, Dict[str, Any]]) -> Dict[str, str]: