Skip to content

Commit d8a7d85

Browse files
committed
Format with ruff
Signed-off-by: Ed Snible <snible@us.ibm.com>
1 parent 8ffc669 commit d8a7d85

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

  • a2a/weather_service/src/weather_service

a2a/weather_service/src/weather_service/agent.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,13 @@ def run():
216216
app.add_middleware(BaseHTTPMiddleware, dispatch=create_tracing_middleware())
217217

218218
class LogAuthorizationMiddleware(BaseHTTPMiddleware):
219-
async def dispatch(self, request, call_next):
220-
auth_header = request.headers.get("authorization", "No Authorization header")
221-
logger.info(
222-
f"🔐 Incoming request to {request.url.path} with Authorization: {auth_header[:80] + '...' if len(auth_header) > 80 else auth_header}"
223-
)
224-
response = await call_next(request)
225-
return response
219+
async def dispatch(self, request, call_next):
220+
auth_header = request.headers.get("authorization", "No Authorization header")
221+
logger.info(
222+
f"🔐 Incoming request to {request.url.path} with Authorization: {auth_header[:80] + '...' if len(auth_header) > 80 else auth_header}"
223+
)
224+
response = await call_next(request)
225+
return response
226226

227227
# Add logging middleware
228228
app.add_middleware(LogAuthorizationMiddleware)

0 commit comments

Comments
 (0)