Commit defc24c4 authored by Roman Yurchak's avatar Roman Yurchak

Lint

parent 79ba41b4
......@@ -68,7 +68,7 @@ def parse_numpy_benchmark(filename):
lines = []
with open(filename) as fp:
for line in fp:
m = re.match('^#\s*(setup|run): (.*)$', line)
m = re.match(r'^#\s*(setup|run): (.*)$', line)
if m:
line = '{} = {!r}\n'.format(m.group(1), m.group(2))
lines.append(line)
......
......@@ -84,7 +84,7 @@ class SeleniumWrapper:
driver.get(f'http://{server_hostname}:{server_port}/test.html')
try:
wait.until(PyodideInited())
except TimeoutException as exc:
except TimeoutException:
_display_driver_logs(self.browser, driver)
raise TimeoutException()
self.wait = wait
......@@ -126,7 +126,7 @@ class SeleniumWrapper:
)
try:
self.wait.until(PackageLoaded())
except TimeoutException as exc:
except TimeoutException:
_display_driver_logs(self.browser, self.driver)
print(self.logs)
raise TimeoutException('runPythonAsync timed out')
......@@ -163,7 +163,7 @@ class SeleniumWrapper:
__tracebackhide__ = True
try:
self.wait.until(PackageLoaded())
except TimeoutException as exc:
except TimeoutException:
_display_driver_logs(self.browser, self.driver)
print(self.logs)
raise TimeoutException('wait_until_packages_loaded timed out')
......
......@@ -71,7 +71,7 @@ def test_pythonexc2js(selenium):
try:
selenium.run_js('return pyodide.runPython("5 / 0")')
except selenium.JavascriptException as e:
assert('ZeroDivisionError' in str(e))
assert 'ZeroDivisionError' in str(e)
else:
assert False, 'Expected exception'
......@@ -393,7 +393,7 @@ def test_cpython_core(python_test, selenium, request):
if e.code != 0:
raise RuntimeError(f'Failed with code: {{e.code}}')
""".format(name))
except selenium.JavascriptException as e:
except selenium.JavascriptException:
print(selenium.logs)
raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment