@@ -1107,10 +1107,10 @@ def test_annotated_types_interval_constraints_in_body_params_invalid(body_value)
11071107 app = APIGatewayRestResolver (enable_validation = True )
11081108
11091109 # AND a constrained type using annotated_types.Interval
1110- ConstrainedInt = Annotated [int , Interval (ge = 0 , le = 100 )]
1110+ constrained_int = Annotated [int , Interval (ge = 0 , le = 100 )]
11111111
11121112 @app .post ("/items" )
1113- def create_item (value : Annotated [ConstrainedInt , Body ()]):
1113+ def create_item (value : Annotated [constrained_int , Body ()]):
11141114 return {"value" : value }
11151115
11161116 # WHEN sending a request with an invalid value
@@ -1146,10 +1146,10 @@ def test_annotated_types_interval_constraints_in_query_params(query_value, expec
11461146 app = APIGatewayRestResolver (enable_validation = True )
11471147
11481148 # AND a constrained type using annotated_types.Interval
1149- ConstrainedInt = Annotated [int , Interval (ge = 0 , le = 100 )]
1149+ constrained_int = Annotated [int , Interval (ge = 0 , le = 100 )]
11501150
11511151 @app .get ("/items" )
1152- def list_items (limit : Annotated [ConstrainedInt , Query ()]):
1152+ def list_items (limit : Annotated [constrained_int , Query ()]):
11531153 return {"limit" : limit }
11541154
11551155 # WHEN sending a request with a valid value
@@ -1186,10 +1186,10 @@ def test_annotated_types_interval_constraints_in_query_params_invalid(query_valu
11861186 app = APIGatewayRestResolver (enable_validation = True )
11871187
11881188 # AND a constrained type using annotated_types.Interval
1189- ConstrainedInt = Annotated [int , Interval (ge = 0 , le = 100 )]
1189+ constrained_int = Annotated [int , Interval (ge = 0 , le = 100 )]
11901190
11911191 @app .get ("/items" )
1192- def list_items (limit : Annotated [ConstrainedInt , Query ()]):
1192+ def list_items (limit : Annotated [constrained_int , Query ()]):
11931193 return {"limit" : limit }
11941194
11951195 # WHEN sending a request with an invalid value
@@ -1213,10 +1213,10 @@ def test_annotated_types_interval_in_openapi_schema():
12131213 from annotated_types import Interval
12141214
12151215 app = APIGatewayRestResolver ()
1216- ConstrainedInt = Annotated [int , Interval (ge = 0 , le = 100 )]
1216+ constrained_int = Annotated [int , Interval (ge = 0 , le = 100 )]
12171217
12181218 @app .get ("/items" )
1219- def list_items (limit : Annotated [ConstrainedInt , Query ()] = 10 ):
1219+ def list_items (limit : Annotated [constrained_int , Query ()] = 10 ):
12201220 return {"limit" : limit }
12211221
12221222 schema = app .get_openapi_schema ()
0 commit comments