Skip to content

Commit

Permalink
Black changes that got missed somehow
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolCat467 committed Aug 29, 2024
1 parent 810534d commit 30babaf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/trio/_tests/test_timeouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ async def task() -> None:
async def test_fail_after_fails_even_if_shielded() -> None:
async def task() -> None:
with pytest.raises(TooSlowError), _core.CancelScope() as outer, fail_after(
TARGET, shield=True
TARGET,
shield=True,
):
outer.cancel()
# The outer scope is cancelled, but this task is protected by the
Expand Down
4 changes: 3 additions & 1 deletion src/trio/_tests/tools/test_gen_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ def test_create_pass_through_args() -> None:
@skip_lints
@pytest.mark.parametrize("imports", [IMPORT_1, IMPORT_2, IMPORT_3])
def test_process(
tmp_path: Path, imports: str, capsys: pytest.CaptureFixture[str]
tmp_path: Path,
imports: str,
capsys: pytest.CaptureFixture[str],
) -> None:
try:
import black # noqa: F401
Expand Down
4 changes: 3 additions & 1 deletion src/trio/_timeouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ def fail_at(deadline: float, *, shield: bool = False) -> AbstractContextManager[


def fail_after(
seconds: float, *, shield: bool = False
seconds: float,
*,
shield: bool = False,
) -> AbstractContextManager[trio.CancelScope]:
"""Creates a cancel scope with the given timeout, and raises an error if
it is actually cancelled.
Expand Down

0 comments on commit 30babaf

Please sign in to comment.