Skip to content

Commit b4d5e6f

Browse files
committed
linter
1 parent 2a052d5 commit b4d5e6f

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

src/a2a/client/auth/interceptor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import logging
1+
import logging # noqa: I001
22
from typing import Any
33

44
from a2a.client.auth.credentials import CredentialService
@@ -32,6 +32,7 @@ async def intercept(
3232
agent_card: AgentCard | None,
3333
context: ClientCallContext | None,
3434
) -> tuple[dict[str, Any], dict[str, Any]]:
35+
"""Applies authentication headers to the request if credentials are available."""
3536
if not all(
3637
(agent_card, agent_card.security, agent_card.securitySchemes)
3738
):

src/a2a/client/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import json
22
import logging
3+
34
from collections.abc import AsyncGenerator
45
from typing import Any
56
from uuid import uuid4
67

78
import httpx
9+
810
from httpx_sse import SSEError, aconnect_sse
911
from pydantic import ValidationError
1012

@@ -27,6 +29,7 @@
2729
)
2830
from a2a.utils.telemetry import SpanKind, trace_class
2931

32+
3033
logger = logging.getLogger(__name__)
3134

3235

src/a2a/client/middleware.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
from __future__ import annotations
22

33
from abc import ABC, abstractmethod
4-
from collections.abc import MutableMapping
54
from typing import TYPE_CHECKING, Any
65

76
from pydantic import BaseModel, Field
87

8+
99
if TYPE_CHECKING:
10+
from collections.abc import MutableMapping
11+
1012
from a2a.types import AgentCard
1113

1214

1315
class ClientCallContext(BaseModel):
14-
"""A context passed with each client call, allowing for call-specific
15-
configuration and data passing.
16+
"""A context passed with each client call, allowing for call-specific.
1617
17-
Such as authentication details or request deadlines.
18+
configuration and data passing. Such as authentication details or
19+
request deadlines.
1820
"""
1921

2022
state: MutableMapping[str, Any] = Field(default_factory=dict)

0 commit comments

Comments
 (0)