1- from  __future__ import  annotations 
2- 
31import  json 
4- from  typing  import  Any 
2+ from  typing  import  Any ,  Dict ,  Optional 
53
64import  pytest 
75from  typing_extensions  import  Annotated 
@@ -19,7 +17,7 @@ def test_bedrock_agent_event():
1917    app  =  BedrockAgentResolver ()
2018
2119    @app .get ("/claims" , description = "Gets claims" ) 
22-     def  claims () ->  dict [str , Any ]:
20+     def  claims () ->  Dict [str , Any ]:
2321        assert  isinstance (app .current_event , BedrockAgentEvent )
2422        assert  app .lambda_context  ==  {}
2523        return  {"output" : claims_response }
@@ -112,7 +110,7 @@ def test_bedrock_agent_event_with_validation_error():
112110    app  =  BedrockAgentResolver ()
113111
114112    @app .get ("/claims" , description = "Gets claims" ) 
115-     def  claims () ->  dict [str , Any ]:
113+     def  claims () ->  Dict [str , Any ]:
116114        return  "oh no, this is not a dict"   # type: ignore 
117115
118116    # WHEN calling the event handler 
@@ -193,7 +191,7 @@ def test_openapi_schema_for_pydanticv2(openapi30_schema):
193191
194192    # WHEN we have a simple handler 
195193    @app .get ("/" , description = "Testing" ) 
196-     def  handler () ->  dict   |   None :
194+     def  handler () ->  Optional [ Dict ] :
197195        pass 
198196
199197    # WHEN we get the schema 
0 commit comments