File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
src/google/adk/tools/mcp_tool
tests/unittests/tools/mcp_tool Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 4141"""
4242
4343from __future__ import annotations
44+
4445import logging
4546import re
4647from typing import Any
@@ -264,7 +265,6 @@ def validate_header_value(
264265 logger .warning (msg )
265266
266267
267-
268268def create_session_state_header_provider (
269269 state_key : str ,
270270 header_name : str = "Authorization" ,
Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515from __future__ import annotations
16+
1617from typing import Callable
1718from typing import Dict
1819
Original file line number Diff line number Diff line change @@ -264,7 +264,10 @@ def test_header_name_validation_invalid_names(self):
264264 for name in invalid_names :
265265 with pytest .raises (ValueError ) as exc_info :
266266 validate_header_name (name )
267- assert "invalid characters" in str (exc_info .value ).lower () or "empty" in str (exc_info .value ).lower ()
267+ assert (
268+ "invalid characters" in str (exc_info .value ).lower ()
269+ or "empty" in str (exc_info .value ).lower ()
270+ )
268271
269272 def test_header_value_sanitization_safe_values (self ):
270273 """Test that safe header values are unchanged."""
@@ -495,7 +498,10 @@ def test_header_name_validation_rfc_compliant(self):
495498 for name in invalid_names :
496499 with pytest .raises (ValueError ) as exc_info :
497500 validate_header_name (name )
498- assert "invalid characters" in str (exc_info .value ).lower () or "empty" in str (exc_info .value ).lower ()
501+ assert (
502+ "invalid characters" in str (exc_info .value ).lower ()
503+ or "empty" in str (exc_info .value ).lower ()
504+ )
499505
500506 def test_header_value_sanitization_rfc_compliant (self ):
501507 """Test that header value sanitization is RFC 7230 compliant."""
You can’t perform that action at this time.
0 commit comments