Skip to content

refactor: make set_credentials synchronous in InMemoryContextCredentialStore#1116

Open
odanilosalve wants to merge 6 commits into
a2aproject:mainfrom
odanilosalve:main
Open

refactor: make set_credentials synchronous in InMemoryContextCredentialStore#1116
odanilosalve wants to merge 6 commits into
a2aproject:mainfrom
odanilosalve:main

Conversation

@odanilosalve

@odanilosalve odanilosalve commented Jun 28, 2026

Copy link
Copy Markdown

Remove unnecessary async keyword from InMemoryContextCredentialStore.set_credentials. The method body is purely synchronous (dict operations) and is not part of any ABC interface contract.

Also removes await from the 4 test call sites that used it.

…dentials

refactor: make set_credentials synchronous in InMemoryContextCredentialStore
@odanilosalve odanilosalve requested a review from a team as a code owner June 28, 2026 14:00

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request changes the set_credentials method in src/a2a/client/auth/credentials.py from asynchronous to synchronous. The corresponding test calls in tests/client/test_auth_interceptor.py have been updated to remove the await keyword. No review comments were provided, and I have no additional feedback.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@github-actions

github-actions Bot commented Jun 28, 2026

Copy link
Copy Markdown

🧪 Code Coverage (vs main)

⬇️ Download Full Report

Base PR Delta
src/a2a/client/auth/interceptor.py 85.42% 80.56% 🔴 -4.86%
src/a2a/client/transports/rest.py 89.89% 86.98% 🔴 -2.91%
Total 92.99% 92.86% 🔴 -0.13%

Generated by coverage-comment.yml

- Suppress S1763 for necessary yield in abstract async generators
- Replace generic Exception with A2AError in JsonRpcTransport._create_jsonrpc_error
- Reduce cognitive complexity in _parse_rest_error by extracting helpers
…dentials

Refactor/remove async set credentials
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant