Skip to content

Commit bc8ac65

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5c2bae4 commit bc8ac65

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

pytest_pyodide/decorator.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,17 @@ class SeleniumType(Protocol):
2626
JavascriptException: type
2727
browser: str
2828

29-
def load_package(self, pkgs: str | list[str]):
30-
...
29+
def load_package(self, pkgs: str | list[str]): ...
3130

32-
def run_async(self, code: str):
33-
...
31+
def run_async(self, code: str): ...
3432

35-
def run_js(self, code: str):
36-
...
33+
def run_js(self, code: str): ...
3734

3835

3936
class _ReadableFileobj(Protocol):
40-
def read(self, __n: int) -> bytes:
41-
...
37+
def read(self, __n: int) -> bytes: ...
4238

43-
def readline(self) -> bytes:
44-
...
39+
def readline(self) -> bytes: ...
4540

4641

4742
class Unpickler(pickle.Unpickler):

pytest_pyodide/fixture.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,11 @@ def selenium_context_manager(selenium_module_scope):
274274

275275
@pytest.fixture
276276
def selenium(request, selenium_module_scope):
277-
with selenium_context_manager(
278-
selenium_module_scope
279-
) as selenium, set_webdriver_script_timeout(
280-
selenium, script_timeout=parse_driver_timeout(request.node)
277+
with (
278+
selenium_context_manager(selenium_module_scope) as selenium,
279+
set_webdriver_script_timeout(
280+
selenium, script_timeout=parse_driver_timeout(request.node)
281+
),
281282
):
282283
yield selenium
283284

@@ -294,10 +295,13 @@ def selenium_jspi_inner(request, runtime, web_server_main, playwright_browsers):
294295
pytest.skip(f"jspi not supported in {runtime}")
295296
if request.config.option.runner.lower() == "playwright":
296297
pytest.skip("jspi not supported with playwright")
297-
with selenium_common(
298-
request, runtime, web_server_main, browsers=playwright_browsers, jspi=True
299-
) as selenium, set_webdriver_script_timeout(
300-
selenium, script_timeout=parse_driver_timeout(request.node)
298+
with (
299+
selenium_common(
300+
request, runtime, web_server_main, browsers=playwright_browsers, jspi=True
301+
) as selenium,
302+
set_webdriver_script_timeout(
303+
selenium, script_timeout=parse_driver_timeout(request.node)
304+
),
301305
):
302306
yield selenium
303307

0 commit comments

Comments
 (0)