From 0e32ff536d30ce8585fa777aaf177f72d35eec13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 14:35:10 +0000 Subject: [PATCH 1/3] Bump ruff from 0.15.15 to 0.15.17 in /python Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.15 to 0.15.17. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.15...0.15.17) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.15.17 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- python/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 0a4e6f34a93..7a6263e9feb 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ dev = [ "uv==0.11.17", "flit==3.12.0", - "ruff==0.15.15", + "ruff==0.15.17", "pytest==9.0.3", "pytest-asyncio==1.4.0", "pytest-cov==7.1.0", From ff5a5ef7f7bc8908c32ac61c1ac77f7af522291f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Jun 2026 01:19:15 +0000 Subject: [PATCH 2/3] Fix CI: bump ruff to 0.15.17 in lab package and update uv.lock --- python/packages/lab/pyproject.toml | 2 +- python/uv.lock | 46 +++++++++++++++--------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/python/packages/lab/pyproject.toml b/python/packages/lab/pyproject.toml index da2095936fc..40adfc1459e 100644 --- a/python/packages/lab/pyproject.toml +++ b/python/packages/lab/pyproject.toml @@ -58,7 +58,7 @@ math = [ [dependency-groups] dev = [ "uv==0.11.17", - "ruff==0.15.15", + "ruff==0.15.17", "pytest==9.0.3", "mypy==1.20.0", "pyright==1.1.408", diff --git a/python/uv.lock b/python/uv.lock index 72aa2d01ad6..63c8f33d3c6 100644 --- a/python/uv.lock +++ b/python/uv.lock @@ -163,7 +163,7 @@ dev = [ { name = "pytest-timeout", specifier = "==2.4.0" }, { name = "pytest-xdist", extras = ["psutil"], specifier = "==3.8.0" }, { name = "rich", specifier = ">=13.7.1,<16.0.0" }, - { name = "ruff", specifier = "==0.15.15" }, + { name = "ruff", specifier = "==0.15.17" }, { name = "tomli", specifier = "==2.4.1" }, { name = "uv", specifier = "==0.11.17" }, ] @@ -705,7 +705,7 @@ dev = [ { name = "pyright", specifier = "==1.1.408" }, { name = "pytest", specifier = "==9.0.3" }, { name = "rich", specifier = ">=13.7.1,<15.0.0" }, - { name = "ruff", specifier = "==0.15.15" }, + { name = "ruff", specifier = "==0.15.17" }, { name = "tau2", git = "https://github.com/sierra-research/tau2-bench?rev=5ba9e3e56db57c5e4114bf7f901291f09b2c5619" }, { name = "tomli", specifier = "==2.4.1" }, { name = "tomli-w", specifier = "==1.2.0" }, @@ -6584,27 +6584,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.15" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/84/6f/a76f7d96e5c962f5b69cee865e49c15c1116897c01990faa8a57edb62e7f/ruff-0.15.15.tar.gz", hash = "sha256:b8dff018130b46d8e5bf0f926ef6b60cf871d6d5ae45fc9334e09632daa741d6", size = 4706985, upload-time = "2026-05-28T14:16:57.784Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/fa/9d/3a45c05b8ab04b4705989de70a79008e27c8003296a0feaee9edc18dd7e9/ruff-0.15.15-py3-none-linux_armv6l.whl", hash = "sha256:cf93e5388f412e1b108b1f8b34a6e036b70fe8aff89393befad96fe48670311b", size = 10710652, upload-time = "2026-05-28T14:16:06.701Z" }, - { url = "https://files.pythonhosted.org/packages/05/66/da974431624bf3b49f6ee1f9543c02d929ff1cba78b0d5a79c38cf21f744/ruff-0.15.15-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ac5a646d1f6a7dadd5d50842dae2c1f9862ac887ef5d1b1375e02def791fde6e", size = 11096615, upload-time = "2026-05-28T14:16:23.313Z" }, - { url = "https://files.pythonhosted.org/packages/8c/09/7443452e5d290230a712103f2fdceeef7184f3ec99a2bd01c8be78aaceb5/ruff-0.15.15-py3-none-macosx_11_0_arm64.whl", hash = "sha256:77d955a431430c66f72dd94e379ad38a16daea3d25094872ac4edf9e797be530", size = 10436683, upload-time = "2026-05-28T14:16:40.974Z" }, - { url = "https://files.pythonhosted.org/packages/53/01/d330c26a57fa4f3943a14424904027428315b700fe4d14a84bb123a649e5/ruff-0.15.15-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7614ee79c69788cf6cedd568069ade9cecc22a1ad20494efe8d0c9ebb4b622d4", size = 10769064, upload-time = "2026-05-28T14:16:28.905Z" }, - { url = "https://files.pythonhosted.org/packages/1d/85/cc8770f8bdff541b1da8392d1634141fe4a0e3f4ee596605959b7906c27f/ruff-0.15.15-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3cdb1679e06a1f6b47bc384714ae96f6e2fb65ca441eb78c43d2ca554176ce1f", size = 10511987, upload-time = "2026-05-28T14:16:43.732Z" }, - { url = "https://files.pythonhosted.org/packages/7c/29/8c190c1472b63013583ba391f3342036e02010544c1270455ed8e519bdf3/ruff-0.15.15-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2728b93d7b23a603ea2c0ac6eb73d760bd38ec9de35f35fb41e18f7a3fee7622", size = 11275100, upload-time = "2026-05-28T14:16:55.244Z" }, - { url = "https://files.pythonhosted.org/packages/9f/6b/7e145ce2cc8e63d6834eca03d83a0e18d121def5c69f91b4cf4011ed4879/ruff-0.15.15-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:be582fcc0db438902c7792b08d6ddf6c9b9e21addaa10092c2c741cfb09e5a45", size = 12176903, upload-time = "2026-05-28T14:16:14.368Z" }, - { url = "https://files.pythonhosted.org/packages/80/a3/d5974637f68e451f7fadf015cf3101d1cd7d8ba5027cffe0b9e3826ebe6b/ruff-0.15.15-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7aa77465b8ecaf1a27bea098d696f7fed5e1eccbd10b321b682d6de586ae5627", size = 11404550, upload-time = "2026-05-28T14:16:20.138Z" }, - { url = "https://files.pythonhosted.org/packages/fe/1c/e6e5e568f22be4fb05d6244234aba384c06b451252453b821e1a529263cf/ruff-0.15.15-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48decfa11d740de4889de623be1463308346312f2409a56e24aa280c86162dc4", size = 11382027, upload-time = "2026-05-28T14:16:46.615Z" }, - { url = "https://files.pythonhosted.org/packages/1d/01/170921b49fcd2e8858825593f91cf7146c3e40a5c3e6df763e4bb0484dde/ruff-0.15.15-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:a5015088452ca0081387063649ec67f06d3d1d6b8b936a1f836b5e9657ecd48c", size = 11366041, upload-time = "2026-05-28T14:16:26.247Z" }, - { url = "https://files.pythonhosted.org/packages/87/54/a7bad711d7de93254e15e06a4c375b89a03d18de45d3e5dcc86a4472fb1a/ruff-0.15.15-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f5294aab6356c81600fcdea3a62bb1b924dfd5e91767c12318d3f68f86af57cd", size = 10741795, upload-time = "2026-05-28T14:16:17.11Z" }, - { url = "https://files.pythonhosted.org/packages/c9/31/38c075963668f8b41c6914ee0f6f318727fbe30ab9145cb29e6df464c5fa/ruff-0.15.15-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:db5bd4d802415cca656dc1616070b725952d6ae95eb5d4831e49fbd94a38f75f", size = 10511117, upload-time = "2026-05-28T14:16:31.767Z" }, - { url = "https://files.pythonhosted.org/packages/9d/96/6ff689e1f7e375d1d97075eca022f74c2bab59554a432fe4d2e6f091986a/ruff-0.15.15-py3-none-musllinux_1_2_i686.whl", hash = "sha256:587a6278ed42059191c1a466e490bd7930fb50bd2e255398bc29616c895a61cb", size = 10994867, upload-time = "2026-05-28T14:16:35.149Z" }, - { url = "https://files.pythonhosted.org/packages/c3/c2/5dce0ab9f92a8d534fa62b9bf9caca3eddb8c1a81b616f5e195ada4f0d6e/ruff-0.15.15-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:df0c1c084f5f4be9812f61518a45c440d3c30d69ce4bf6c5270e66d38338f02a", size = 11482101, upload-time = "2026-05-28T14:16:49.598Z" }, - { url = "https://files.pythonhosted.org/packages/b1/c0/1003b60edd697c649faf61f1a34094b1abb38fb3d1181e3f895781250a08/ruff-0.15.15-py3-none-win32.whl", hash = "sha256:29428ea79694afbe756d45fd59b36f22b6b020dc0443cf7de0173046236964b9", size = 10716774, upload-time = "2026-05-28T14:16:52.337Z" }, - { url = "https://files.pythonhosted.org/packages/02/a8/1269eddd6945a06c23f055ef7848886e37cf9d6a8bebb386a3115f01470c/ruff-0.15.15-py3-none-win_amd64.whl", hash = "sha256:8df0323902e15e24bc4bf246da830573d3cf3352bd0b9a164eab335d111ff4a4", size = 11868463, upload-time = "2026-05-28T14:16:11.333Z" }, - { url = "https://files.pythonhosted.org/packages/4e/b2/920464c907b191e37469d477a1aa8bc048b8f36c4c1610dfa4ab87b39e18/ruff-0.15.15-py3-none-win_arm64.whl", hash = "sha256:3c8ceca6792f38196b8f589bc92eccd03eef286602da92e5dc05cc42ef6441b7", size = 11138498, upload-time = "2026-05-28T14:16:38.425Z" }, +version = "0.15.17" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8c/a9/3abdf488f1bf3d24c699415e454ed554a6350d5d89ce183be1ee0a3361ac/ruff-0.15.17.tar.gz", hash = "sha256:2ec446937fd16c8c4de2674a209cc5af64d9c6f17d21fbf1151054fa0bcf5219", size = 4743346, upload-time = "2026-06-11T17:54:47.663Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/db/4d/e11259f5da07cb6afb2d074c31bf09da9671993f7329d4f15d2fdc458301/ruff-0.15.17-py3-none-linux_armv6l.whl", hash = "sha256:d9feddb927fc68bd295f5eebc587a7e42cfaf9b65f60ca4a2386febff575da8f", size = 10856677, upload-time = "2026-06-11T17:54:49.533Z" }, + { url = "https://files.pythonhosted.org/packages/29/3e/772d679e1a0dc058e58875bd2c0cb713a0530877b4a76fee3c7966df0d49/ruff-0.15.17-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:25805a226d741c47d274a35ad5c10a7dde175fcddfa511d7cf3da0a21eb3eab7", size = 11223443, upload-time = "2026-06-11T17:55:00.573Z" }, + { url = "https://files.pythonhosted.org/packages/68/58/bd41f7688b2fd5623012605130ed70e60aa7f2244baa3d5066bdd61530c8/ruff-0.15.17-py3-none-macosx_11_0_arm64.whl", hash = "sha256:f6ad73b14c2d18a3bf8ad7cb6974294d7f613a7898604826058e6ac64918ef4d", size = 10566458, upload-time = "2026-06-11T17:55:07.52Z" }, + { url = "https://files.pythonhosted.org/packages/d8/5b/733371013fcf1ec339e477ece6ab42bfe10bdd9bba8ee88a9516aa56bfc0/ruff-0.15.17-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ba0c1e4f95bcb3869d0d30cbd5917071ef2e28665abfec970cdab0492c713ed", size = 10914483, upload-time = "2026-06-11T17:55:05.501Z" }, + { url = "https://files.pythonhosted.org/packages/bd/cc/6f24251cc0252f7239391ccb85833f320efad14ebe5b443943f37ced6332/ruff-0.15.17-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:81647960f10bff57d2e51cadd0c3950fe598400c852863a038720ef5b8cca91e", size = 10647497, upload-time = "2026-06-11T17:54:57.733Z" }, + { url = "https://files.pythonhosted.org/packages/68/dd/0d10c17ce1a1624d6fc3156309c3f834fdb5dfaad026ec90c85684f3990e/ruff-0.15.17-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0e01a84ddbc8c16c23055ba3924476850f1bbc1917cebbb9376665a63e74260d", size = 11416967, upload-time = "2026-06-11T17:54:51.461Z" }, + { url = "https://files.pythonhosted.org/packages/2f/91/556bfb156f6144f355e831c23db00b2fc4120f86b3ce81cc5f7fd2df51f3/ruff-0.15.17-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84fe9f653152f8f294f9f7e03bf3a453d8b4a27f7a59c78c8666167f2b17b96c", size = 12335770, upload-time = "2026-06-11T17:54:45.793Z" }, + { url = "https://files.pythonhosted.org/packages/88/82/8b5999aa13355e926f06d9f42a32dcca862f623bf0363785ff89d607dffd/ruff-0.15.17-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c0fe88a7676e7a05b73174d4d4a59cb2ac21ff8263583f87a81a6018475a978", size = 11575441, upload-time = "2026-06-11T17:54:32.661Z" }, + { url = "https://files.pythonhosted.org/packages/11/93/f10377bb04109ca0e8cbc483ff1982c54b6d418210041776f93e8cdc7fa9/ruff-0.15.17-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ecfc3c7878fff94633ab0348524e093f9ce3243080416dd7d14f8ba400174719", size = 11557614, upload-time = "2026-06-11T17:54:34.698Z" }, + { url = "https://files.pythonhosted.org/packages/c7/a6/eeeae7f7d5493df41649ab3db92f086b2d0a30199e4efdf8e3dd7a033f24/ruff-0.15.17-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:b8461180b22420b1bdc289909410930761629fddf2a5aaf60fae1ab26cedc4c4", size = 11544450, upload-time = "2026-06-11T17:54:39.042Z" }, + { url = "https://files.pythonhosted.org/packages/32/88/5991ce565129a24dd4a00db1254b3b5db2e53018cbe4018ea5a89738e727/ruff-0.15.17-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:6eccbe50a038b503e7140b441aa9c7fc8c1f36edf23ebef9f4165c2f28f568b7", size = 10892524, upload-time = "2026-06-11T17:55:09.432Z" }, + { url = "https://files.pythonhosted.org/packages/f5/1d/0fdd248313425f55223968af04b0a42125466a8d88d21c1d99c6af0a51e8/ruff-0.15.17-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:382fc0521025f5a8ad447d8bdd523545d0d7646adb718eb1c2dac5065ec27c0f", size = 10659573, upload-time = "2026-06-11T17:54:36.824Z" }, + { url = "https://files.pythonhosted.org/packages/9e/0e/072e8260deb9461062ce9311ced27a8e541229a6ffd483013dd37661e43e/ruff-0.15.17-py3-none-musllinux_1_2_i686.whl", hash = "sha256:456d41fcd1b2777ad63f09a6e7121d43f7b688bbc76a800c10f7f8fb1f912c3f", size = 11127818, upload-time = "2026-06-11T17:55:03.124Z" }, + { url = "https://files.pythonhosted.org/packages/ab/b4/55060a34163121498014696b5f656db5b8c6963768f227dbf0d76b311073/ruff-0.15.17-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b1a04bcc94ae6194e9db05d16ad31f298a7194bfbcb08258bbe589cee1d587b8", size = 11655901, upload-time = "2026-06-11T17:54:53.562Z" }, + { url = "https://files.pythonhosted.org/packages/49/71/9b29d6b87cef468d697f43c6a91e3fae4a80185779d7d5a4ef27d173439f/ruff-0.15.17-py3-none-win32.whl", hash = "sha256:596065960ab1ff593f744220c9fe6580eda00a95003cffa9f4048bb5b1bf0392", size = 10925574, upload-time = "2026-06-11T17:54:55.723Z" }, + { url = "https://files.pythonhosted.org/packages/3d/b2/8fc77f3723228836fa5d12497eb71c808f83782e10d058d2b15cfa14640b/ruff-0.15.17-py3-none-win_amd64.whl", hash = "sha256:6769e5fa1710b179b92e0bfa5a51735b35baea9013dadb06d5f44cbcf9547084", size = 12058788, upload-time = "2026-06-11T17:54:41.042Z" }, + { url = "https://files.pythonhosted.org/packages/2d/c7/c53e8dbff9c9dc4b7928773421ae294a5d28fcb8dcda1a089579d3a7e510/ruff-0.15.17-py3-none-win_arm64.whl", hash = "sha256:f3be1fbb34bcdfd146240d8fb92a709d4c2c8191348580a3c044ec60fa0b4456", size = 11355275, upload-time = "2026-06-11T17:54:43.635Z" }, ] [[package]] From 5957e2f87d57c45c7688abb0cdea0552525b2f54 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Jun 2026 01:49:13 +0000 Subject: [PATCH 3/3] Fix ruff ASYNC119 errors: add noqa suppressions for yield-in-context-manager in async generators --- .../agent_framework/_workflows/_functional.py | 24 +++++++++---------- .../agent_framework/_workflows/_workflow.py | 18 +++++++------- .../devui/agent_framework_devui/_executor.py | 6 ++--- .../agent_framework_openai/_chat_client.py | 6 ++--- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/python/packages/core/agent_framework/_workflows/_functional.py b/python/packages/core/agent_framework/_workflows/_functional.py index 73c0815862e..5a96867c44e 100644 --- a/python/packages/core/agent_framework/_workflows/_functional.py +++ b/python/packages/core/agent_framework/_workflows/_functional.py @@ -974,9 +974,9 @@ async def _on_step_completed() -> None: span.add_event(OtelAttr.WORKFLOW_STARTED) with _framework_event_origin(): - yield WorkflowEvent.started() + yield WorkflowEvent.started() # noqa: ASYNC119 with _framework_event_origin(): - yield WorkflowEvent.status(WorkflowRunState.IN_PROGRESS) + yield WorkflowEvent.status(WorkflowRunState.IN_PROGRESS) # noqa: ASYNC119 # Execute the user function return_value = await self._execute(ctx, message) @@ -999,10 +999,10 @@ async def _on_step_completed() -> None: for event in ctx._get_events(): if event.type == "request_info": saw_request = True - yield event + yield event # noqa: ASYNC119 if event.type == "request_info": with _framework_event_origin(): - yield WorkflowEvent.status(WorkflowRunState.IN_PROGRESS_PENDING_REQUESTS) + yield WorkflowEvent.status(WorkflowRunState.IN_PROGRESS_PENDING_REQUESTS) # noqa: ASYNC119 # Save final checkpoint if storage is available if storage is not None: @@ -1012,7 +1012,7 @@ async def _on_step_completed() -> None: if saw_request: self._last_pending_request_ids = set(ctx._pending_requests) with _framework_event_origin(): - yield WorkflowEvent.status(WorkflowRunState.IDLE_WITH_PENDING_REQUESTS) + yield WorkflowEvent.status(WorkflowRunState.IDLE_WITH_PENDING_REQUESTS) # noqa: ASYNC119 else: # Clean completion — drop cross-run replay state. self._last_message = None @@ -1020,7 +1020,7 @@ async def _on_step_completed() -> None: self._last_step_cache_auto_request_info_counts = {} self._last_pending_request_ids = set() with _framework_event_origin(): - yield WorkflowEvent.status(WorkflowRunState.IDLE) + yield WorkflowEvent.status(WorkflowRunState.IDLE) # noqa: ASYNC119 span.add_event(OtelAttr.WORKFLOW_COMPLETED) @@ -1034,30 +1034,30 @@ async def _on_step_completed() -> None: for event in ctx._get_events(): if event.type == "request_info": saw_request = True - yield event + yield event # noqa: ASYNC119 if event.type == "request_info": with _framework_event_origin(): - yield WorkflowEvent.status(WorkflowRunState.IN_PROGRESS_PENDING_REQUESTS) + yield WorkflowEvent.status(WorkflowRunState.IN_PROGRESS_PENDING_REQUESTS) # noqa: ASYNC119 # Save checkpoint if storage is not None: await self._save_checkpoint(ctx, storage, ckpt_chain[0]) with _framework_event_origin(): - yield WorkflowEvent.status(WorkflowRunState.IDLE_WITH_PENDING_REQUESTS) + yield WorkflowEvent.status(WorkflowRunState.IDLE_WITH_PENDING_REQUESTS) # noqa: ASYNC119 span.add_event(OtelAttr.WORKFLOW_COMPLETED) except Exception as exc: # Yield any events collected before the failure for event in ctx._get_events(): - yield event + yield event # noqa: ASYNC119 details = WorkflowErrorDetails.from_exception(exc) with _framework_event_origin(): - yield WorkflowEvent.failed(details) + yield WorkflowEvent.failed(details) # noqa: ASYNC119 with _framework_event_origin(): - yield WorkflowEvent.status(WorkflowRunState.FAILED) + yield WorkflowEvent.status(WorkflowRunState.FAILED) # noqa: ASYNC119 span.add_event( name=OtelAttr.WORKFLOW_ERROR, diff --git a/python/packages/core/agent_framework/_workflows/_workflow.py b/python/packages/core/agent_framework/_workflows/_workflow.py index c4840bb0455..8fdc650e3d9 100644 --- a/python/packages/core/agent_framework/_workflows/_workflow.py +++ b/python/packages/core/agent_framework/_workflows/_workflow.py @@ -528,11 +528,11 @@ async def _run_workflow_with_tracing( # Emit explicit start/status events to the stream with _framework_event_origin(): started = WorkflowEvent.started() - yield started # noqa: RUF070 + yield started # noqa: RUF070, ASYNC119 self._status = WorkflowRunState.IN_PROGRESS with _framework_event_origin(): in_progress = WorkflowEvent.status(self._status) - yield in_progress # noqa: RUF070 + yield in_progress # noqa: RUF070, ASYNC119 # Per-run reset for fresh-message runs only. We deliberately # do NOT clear shared workflow state (`_state.clear()`) or the @@ -582,41 +582,41 @@ async def _run_workflow_with_tracing( # Track request events for final status determination if event.type == "request_info": saw_request = True - yield event + yield event # noqa: ASYNC119 if event.type == "request_info" and not emitted_in_progress_pending: emitted_in_progress_pending = True self._status = WorkflowRunState.IN_PROGRESS_PENDING_REQUESTS with _framework_event_origin(): pending_status = WorkflowEvent.status(self._status) - yield pending_status # noqa: RUF070 + yield pending_status # noqa: RUF070, ASYNC119 # Workflow runs until idle - emit final status based on whether requests are pending if saw_request: self._status = WorkflowRunState.IDLE_WITH_PENDING_REQUESTS with _framework_event_origin(): terminal_status = WorkflowEvent.status(self._status) - yield terminal_status + yield terminal_status # noqa: ASYNC119 else: self._status = WorkflowRunState.IDLE with _framework_event_origin(): terminal_status = WorkflowEvent.status(self._status) - yield terminal_status + yield terminal_status # noqa: ASYNC119 span.add_event(OtelAttr.WORKFLOW_COMPLETED) except Exception as exc: # Drain any pending events (for example, executor_failed) before yielding failed event for event in await self._runner.context.drain_events(): - yield event + yield event # noqa: ASYNC119 # Surface structured failure details before propagating exception details = WorkflowErrorDetails.from_exception(exc) with _framework_event_origin(): failed_event = WorkflowEvent.failed(details) - yield failed_event # noqa: RUF070 + yield failed_event # noqa: RUF070, ASYNC119 self._status = WorkflowRunState.FAILED with _framework_event_origin(): failed_status = WorkflowEvent.status(WorkflowRunState.FAILED) - yield failed_status # noqa: RUF070 + yield failed_status # noqa: RUF070, ASYNC119 span.add_event( name=OtelAttr.WORKFLOW_ERROR, attributes={ diff --git a/python/packages/devui/agent_framework_devui/_executor.py b/python/packages/devui/agent_framework_devui/_executor.py index e217341511c..3084e600fd4 100644 --- a/python/packages/devui/agent_framework_devui/_executor.py +++ b/python/packages/devui/agent_framework_devui/_executor.py @@ -299,7 +299,7 @@ async def execute_entity(self, entity_id: str, request: AgentFrameworkRequest) - with capture_traces(response_id=response_id, entity_id=entity_id) as trace_collector: if entity_info.type == "agent": async for event in self._execute_agent(entity_obj, request, trace_collector): - yield event + yield event # noqa: ASYNC119 elif entity_info.type == "workflow": async for event in self._execute_workflow(entity_obj, request, trace_collector): # Log request_info event (type='request_info') for debugging HIL flow @@ -312,13 +312,13 @@ async def execute_entity(self, entity_id: str, request: AgentFrameworkRequest) - logger.info(f" request_type: {getattr(event, 'request_type', 'N/A')}") data = getattr(event, "data", None) logger.info(f" data type: {type(data).__name__ if data else 'None'}") - yield event + yield event # noqa: ASYNC119 else: raise ValueError(f"Unsupported entity type: {entity_info.type}") # Yield any remaining trace events after execution completes for trace_event in trace_collector.get_pending_events(): - yield trace_event + yield trace_event # noqa: ASYNC119 except Exception as e: logger.exception(f"Error executing entity {entity_id}: {e}") diff --git a/python/packages/openai/agent_framework_openai/_chat_client.py b/python/packages/openai/agent_framework_openai/_chat_client.py index 14237e06a02..812466ff70f 100644 --- a/python/packages/openai/agent_framework_openai/_chat_client.py +++ b/python/packages/openai/agent_framework_openai/_chat_client.py @@ -659,7 +659,7 @@ async def _stream() -> AsyncIterable[ChatResponseUpdate]: ) if served_model is not None: update.model = served_model - yield update + yield update # noqa: ASYNC119 except Exception as ex: self._handle_request_error(ex) else: @@ -679,7 +679,7 @@ async def _stream() -> AsyncIterable[ChatResponseUpdate]: # surface the served-model header. async with client.responses.stream(**run_options) as response: async for chunk in response: - yield self._parse_chunk_from_openai( + yield self._parse_chunk_from_openai( # noqa: ASYNC119 chunk, options=validated_options, function_call_ids=function_call_ids, @@ -701,7 +701,7 @@ async def _stream() -> AsyncIterable[ChatResponseUpdate]: ) if served_model is not None: update.model = served_model - yield update + yield update # noqa: ASYNC119 except Exception as ex: self._handle_request_error(ex)