[cleanup] Bump ruff to 0.5.x (#10282)

Authored by: seproDev
This commit is contained in:
sepro
2024-06-29 17:30:57 +02:00
committed by GitHub
parent 54a63e80af
commit 7814c50948
5 changed files with 16 additions and 20 deletions

View File

@@ -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]