@@ -140,7 +140,7 @@ def validate_request() -> None:
140140 )
141141
142142
143- @VWS_FLASK_APP .errorhandler (ValidatorError )
143+ @VWS_FLASK_APP .errorhandler (code_or_exception = ValidatorError )
144144def handle_exceptions (exc : ValidatorError ) -> Response :
145145 """
146146 Return the error response associated with the given exception.
@@ -156,7 +156,7 @@ def handle_exceptions(exc: ValidatorError) -> Response:
156156 return response
157157
158158
159- @VWS_FLASK_APP .route ("/targets" , methods = [HTTPMethod .POST ])
159+ @VWS_FLASK_APP .route (rule = "/targets" , methods = [HTTPMethod .POST ])
160160@beartype
161161def add_target () -> Response :
162162 """Add a target.
@@ -228,7 +228,9 @@ def add_target() -> Response:
228228 )
229229
230230
231- @VWS_FLASK_APP .route ("/targets/<string:target_id>" , methods = [HTTPMethod .GET ])
231+ @VWS_FLASK_APP .route (
232+ rule = "/targets/<string:target_id>" , methods = [HTTPMethod .GET ]
233+ )
232234@beartype
233235def get_target (target_id : str ) -> Response :
234236 """Get details of a target.
@@ -337,7 +339,7 @@ def delete_target(target_id: str) -> Response:
337339 )
338340
339341
340- @VWS_FLASK_APP .route ("/summary" , methods = [HTTPMethod .GET ])
342+ @VWS_FLASK_APP .route (rule = "/summary" , methods = [HTTPMethod .GET ])
341343@beartype
342344def database_summary () -> Response :
343345 """Get a database summary report.
@@ -418,7 +420,7 @@ def target_summary(target_id: str) -> Response:
418420 "result_code" : ResultCodes .SUCCESS .value ,
419421 "database_name" : database .database_name ,
420422 "target_name" : target .name ,
421- "upload_date" : target .upload_date .strftime ("%Y-%m-%d" ),
423+ "upload_date" : target .upload_date .strftime (format = "%Y-%m-%d" ),
422424 "active_flag" : target .active_flag ,
423425 "tracking_rating" : target .tracking_rating ,
424426 "total_recos" : target .total_recos ,
@@ -506,7 +508,7 @@ def get_duplicates(target_id: str) -> Response:
506508 )
507509
508510
509- @VWS_FLASK_APP .route ("/targets" , methods = [HTTPMethod .GET ])
511+ @VWS_FLASK_APP .route (rule = "/targets" , methods = [HTTPMethod .GET ])
510512def target_list () -> Response :
511513 """Get a list of all targets.
512514
@@ -546,7 +548,9 @@ def target_list() -> Response:
546548 )
547549
548550
549- @VWS_FLASK_APP .route ("/targets/<string:target_id>" , methods = [HTTPMethod .PUT ])
551+ @VWS_FLASK_APP .route (
552+ rule = "/targets/<string:target_id>" , methods = [HTTPMethod .PUT ]
553+ )
550554def update_target (target_id : str ) -> Response :
551555 """Update a target.
552556
0 commit comments