Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 13, 2025
1 parent e1f0aea commit 3166f34
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/anyio/_backends/_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1980,8 +1980,7 @@ def acquire_nowait(self) -> None:
def acquire_on_behalf_of_nowait(self, borrower: object) -> None:
if borrower in self._borrowers:
raise RuntimeError(
"this borrower is already holding one of this CapacityLimiter's "
"tokens"
"this borrower is already holding one of this CapacityLimiter's tokens"
)

if self._wait_queue or len(self._borrowers) >= self._total_tokens:
Expand Down
6 changes: 3 additions & 3 deletions src/anyio/_core/_asyncio_selector_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def _stop(self) -> None:
self._receive.close()
self._selector.close()
_selector = None
assert (
not self._selector.get_map()
), "selector still has registered file descriptors after shutdown"
assert not self._selector.get_map(), (
"selector still has registered file descriptors after shutdown"
)

def _notify_self(self) -> None:
try:
Expand Down
3 changes: 1 addition & 2 deletions src/anyio/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ def get_runner(
def pytest_configure(config: Any) -> None:
config.addinivalue_line(
"markers",
"anyio: mark the (coroutine function) test to be run "
"asynchronously via anyio.",
"anyio: mark the (coroutine function) test to be run asynchronously via anyio.",
)


Expand Down
3 changes: 1 addition & 2 deletions tests/test_subprocesses.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ async def test_run_process_inherit_stdout(capfd: pytest.CaptureFixture[str]) ->
[
sys.executable,
"-c",
'import sys; print("stderr-text", file=sys.stderr); '
'print("stdout-text")',
'import sys; print("stderr-text", file=sys.stderr); print("stdout-text")',
],
check=True,
stdout=None,
Expand Down

0 comments on commit 3166f34

Please sign in to comment.