Skip to content

Commit 642ec26

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3ccb9dd commit 642ec26

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
@@ -24,22 +24,17 @@ class SeleniumType(Protocol):
2424
JavascriptException: type
2525
browser: str
2626

27-
def load_package(self, pkgs: str | list[str]):
28-
...
27+
def load_package(self, pkgs: str | list[str]): ...
2928

30-
def run_async(self, code: str):
31-
...
29+
def run_async(self, code: str): ...
3230

33-
def run_js(self, code: str):
34-
...
31+
def run_js(self, code: str): ...
3532

3633

3734
class _ReadableFileobj(Protocol):
38-
def read(self, __n: int) -> bytes:
39-
...
35+
def read(self, __n: int) -> bytes: ...
4036

41-
def readline(self) -> bytes:
42-
...
37+
def readline(self) -> bytes: ...
4338

4439

4540
class Unpickler(pickle.Unpickler):

pytest_pyodide/fixture.py

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

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

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

0 commit comments

Comments
 (0)