From 768ccccd9b18bc48d129b12d14eace4ebb3655d8 Mon Sep 17 00:00:00 2001 From: dirkf Date: Tue, 28 May 2024 15:59:34 +0100 Subject: [PATCH] [compat] Avoid type comparison in `compat_ord` NB This isn't actually a compat fn; it should be utils.int_from_int_or_char --- youtube_dl/compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py index 0371896ab..ed1a33cf2 100644 --- a/youtube_dl/compat.py +++ b/youtube_dl/compat.py @@ -2970,7 +2970,7 @@ except (AssertionError, UnicodeEncodeError): def compat_ord(c): - if type(c) is int: + if isinstance(c, int): return c else: return ord(c)