From 7814c50948a2b9a4c746441ecbc509ae563d5d1f Mon Sep 17 00:00:00 2001 From: sepro <4618135+seproDev@users.noreply.github.com> Date: Sat, 29 Jun 2024 17:30:57 +0200 Subject: [cleanup] Bump ruff to 0.5.x (#10282) Authored by: seproDev --- yt_dlp/jsinterp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'yt_dlp/jsinterp.py') diff --git a/yt_dlp/jsinterp.py b/yt_dlp/jsinterp.py index 5c82de19e..a0f32892f 100644 --- a/yt_dlp/jsinterp.py +++ b/yt_dlp/jsinterp.py @@ -667,12 +667,12 @@ class JSInterpreter: self.interpret_expression(v, local_vars, allow_recursion) for v in self._separate(arg_str)] - if obj == str: + if obj is str: if member == 'fromCharCode': assertion(argvals, 'takes one or more arguments') return ''.join(map(chr, argvals)) raise self.Exception(f'Unsupported String method {member}', expr) - elif obj == float: + elif obj is float: if member == 'pow': assertion(len(argvals) == 2, 'takes two arguments') return argvals[0] ** argvals[1] -- cgit v1.2.3