ruff: Fix E721 Do not compare types, use `isinstance()`.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-08-10 11:06:31 -07:00 committed by Anders Kaseorg
parent 76d9b1d9d0
commit 53e8c0c497
1 changed files with 2 additions and 2 deletions

View File

@ -185,14 +185,14 @@ def get_emoji_file_content(
logger.info("Downloading %s", original_emoji_url)
response = session.get(original_emoji_url)
if response.status_code == 200:
assert type(response.content) == bytes
assert isinstance(response.content, bytes)
return response.content
logger.info("Error fetching emoji from URL %s", original_emoji_url)
logger.info("Trying %s instead", emoji_url)
response = session.get(emoji_url)
if response.status_code == 200:
assert type(response.content) == bytes
assert isinstance(response.content, bytes)
return response.content
logger.info("Error fetching emoji from URL %s", emoji_url)
logger.error("Could not fetch emoji %s", emoji_id)