diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 302966485..bda4b08a4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,11 +20,11 @@ repos: - id: sort-simple-yaml files: .pre-commit-config.yaml - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.11.0 + rev: 25.12.0 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.7 + rev: v0.14.8 hooks: - id: ruff-check types: [file] @@ -73,7 +73,7 @@ repos: additional_dependencies: ["pyyaml"] files: ^(test-requirements\.txt)|(\.pre-commit-config\.yaml)$ - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.9.14 + rev: 0.9.16 hooks: # Compile requirements - id: pip-compile diff --git a/src/trio/_core/_traps.py b/src/trio/_core/_traps.py index 652cc0b87..14f66af92 100644 --- a/src/trio/_core/_traps.py +++ b/src/trio/_core/_traps.py @@ -66,7 +66,9 @@ class PermanentlyDetachCoroutineObject: def _real_async_yield( obj: MessageType, ) -> Generator[MessageType, None, None]: - return (yield obj) + # "Using `yield` and `return {value}` in a generator function can + # lead to confusing behavior" + return (yield obj) # noqa: B901 # Real yield value is from trio's main loop, but type checkers can't diff --git a/test-requirements.txt b/test-requirements.txt index b15592632..26e63e0c8 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -14,7 +14,7 @@ attrs==25.4.0 # outcome babel==2.17.0 # via sphinx -black==25.11.0 ; implementation_name == 'cpython' +black==25.12.0 ; implementation_name == 'cpython' # via -r test-requirements.in certifi==2025.11.12 # via requests @@ -136,7 +136,7 @@ requests==2.32.5 # via sphinx roman-numerals==3.1.0 ; python_full_version >= '3.11' # via sphinx -ruff==0.14.7 +ruff==0.14.8 # via -r test-requirements.in sniffio==1.3.1 # via -r test-requirements.in @@ -196,7 +196,7 @@ typing-extensions==4.15.0 # virtualenv urllib3==2.5.0 # via requests -uv==0.9.14 +uv==0.9.16 # via -r test-requirements.in virtualenv==20.35.4 # via pre-commit