@@ -874,7 +874,7 @@ async def run_test_iteration(
874874 # Record start time
875875 start_time = time .time ()
876876 iteration_result ["start_time" ] = datetime .fromtimestamp (
877- start_time , tz = timezone .utc
877+ start_time , tz = timezone .utc # noqa: UP017
878878 ).isoformat ()
879879
880880 # Get initial metrics if monitoring is enabled
@@ -891,7 +891,7 @@ async def run_test_iteration(
891891 # Record end time
892892 end_time = time .time ()
893893 iteration_result ["end_time" ] = datetime .fromtimestamp (
894- end_time , tz = timezone .utc
894+ end_time , tz = timezone .utc # noqa: UP017
895895 ).isoformat ()
896896
897897 # Collect final metrics
@@ -1114,7 +1114,7 @@ async def create_mcp_plugin(
11141114 "mode" : mode ,
11151115 "spec_source" : spec_url_or_path ,
11161116 "target_url" : target_url ,
1117- "created_at" : datetime .now (timezone .utc ).isoformat (),
1117+ "created_at" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
11181118 "plugin_config" : {},
11191119 "mcp_config" : {},
11201120 "mock_server_path" : None ,
@@ -1278,7 +1278,7 @@ async def create_mcp_plugin(
12781278 "mode" : mode ,
12791279 "spec_source" : spec_url_or_path ,
12801280 "error" : f"Plugin creation failed: { e !s} " ,
1281- "created_at" : datetime .now (timezone .utc ).isoformat (),
1281+ "created_at" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
12821282 "plugin_config" : {},
12831283 "mcp_config" : {},
12841284 "mock_server_path" : None ,
@@ -1782,7 +1782,7 @@ def _generate_session_summary(session_data: dict[str, Any]) -> dict[str, Any]:
17821782def _calculate_next_execution (schedule_config : dict [str , Any ]) -> str :
17831783 """Calculate next execution time."""
17841784 # Simplified implementation
1785- return datetime .now (timezone .utc ).isoformat ()
1785+ return datetime .now (timezone .utc ).isoformat () # noqa: UP017
17861786
17871787
17881788def _validate_test_suite (test_suite : dict [str , Any ]) -> dict [str , bool ]:
@@ -2250,7 +2250,7 @@ async def generate_test_report(
22502250 "report_id" : str (uuid .uuid4 ()),
22512251 "report_format" : report_format ,
22522252 "output_format" : output_format ,
2253- "generated_at" : datetime .now (timezone .utc ).isoformat (),
2253+ "generated_at" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
22542254 "report_content" : {},
22552255 "chart_data" : None ,
22562256 "export_data" : None ,
@@ -2303,7 +2303,7 @@ async def generate_test_report(
23032303 "report_format" : report_format ,
23042304 "output_format" : output_format ,
23052305 "error" : f"Report generation failed: { e !s} " ,
2306- "generated_at" : datetime .now (timezone .utc ).isoformat (),
2306+ "generated_at" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
23072307 "report_content" : {},
23082308 "chart_data" : None ,
23092309 "export_data" : None ,
@@ -2547,7 +2547,7 @@ async def create_test_session(
25472547 "status" : "success" ,
25482548 "session_id" : session_id ,
25492549 "session_name" : session_name ,
2550- "created_at" : datetime .now (timezone .utc ).isoformat (),
2550+ "created_at" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
25512551 "test_plan" : test_plan ,
25522552 "session_config" : session_config or {},
25532553 "session_state" : "created" ,
@@ -2571,7 +2571,7 @@ async def create_test_session(
25712571 "session_id" : None ,
25722572 "session_name" : session_name ,
25732573 "error" : f"Test session creation failed: { e !s} " ,
2574- "created_at" : datetime .now (timezone .utc ).isoformat (),
2574+ "created_at" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
25752575 "test_plan" : {},
25762576 "session_config" : {},
25772577 "session_state" : "error" ,
@@ -2599,14 +2599,14 @@ async def end_test_session(
25992599 "status" : "error" ,
26002600 "session_id" : session_id ,
26012601 "error" : "Test session not found" ,
2602- "ended_at" : datetime .now (timezone .utc ).isoformat (),
2602+ "ended_at" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
26032603 "final_report" : None ,
26042604 "session_summary" : {},
26052605 }
26062606
26072607 session_data = _active_test_sessions [session_id ]
26082608 session_data ["session_state" ] = "completed"
2609- session_data ["ended_at" ] = datetime .now (timezone .utc ).isoformat ()
2609+ session_data ["ended_at" ] = datetime .now (timezone .utc ).isoformat () # noqa: UP017
26102610
26112611 end_result = {
26122612 "status" : "success" ,
@@ -2640,7 +2640,7 @@ async def end_test_session(
26402640 "status" : "error" ,
26412641 "session_id" : session_id ,
26422642 "error" : f"Test session completion failed: { e !s} " ,
2643- "ended_at" : datetime .now (timezone .utc ).isoformat (),
2643+ "ended_at" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
26442644 "final_report" : None ,
26452645 "session_summary" : {},
26462646 }
@@ -2671,7 +2671,7 @@ async def schedule_test_suite(
26712671 "test_suite" : test_suite ,
26722672 "schedule_config" : schedule_config ,
26732673 "notification_config" : notification_config or {},
2674- "created_at" : datetime .now (timezone .utc ).isoformat (),
2674+ "created_at" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
26752675 "next_execution" : _calculate_next_execution (schedule_config ),
26762676 "schedule_state" : "active" ,
26772677 "validation_result" : _validate_test_suite (test_suite ),
@@ -2695,7 +2695,7 @@ async def schedule_test_suite(
26952695 "test_suite" : {},
26962696 "schedule_config" : {},
26972697 "notification_config" : {},
2698- "created_at" : datetime .now (timezone .utc ).isoformat (),
2698+ "created_at" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
26992699 "next_execution" : None ,
27002700 "schedule_state" : "error" ,
27012701 "validation_result" : {"valid" : False , "errors" : []},
@@ -2726,7 +2726,7 @@ async def monitor_test_progress(
27262726 "progress" : {},
27272727 "performance_data" : {},
27282728 "alerts" : [],
2729- "monitoring_timestamp" : datetime .now (timezone .utc ).isoformat (),
2729+ "monitoring_timestamp" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
27302730 }
27312731
27322732 session_data = _active_test_sessions [session_id ]
@@ -2740,7 +2740,7 @@ async def monitor_test_progress(
27402740 "progress_percentage" : _calculate_progress_percentage (progress ),
27412741 "performance_data" : {},
27422742 "alerts" : [],
2743- "monitoring_timestamp" : datetime .now (timezone .utc ).isoformat (),
2743+ "monitoring_timestamp" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
27442744 }
27452745
27462746 # Include performance data if requested
@@ -2777,7 +2777,7 @@ async def monitor_test_progress(
27772777 "progress" : {},
27782778 "performance_data" : {},
27792779 "alerts" : [],
2780- "monitoring_timestamp" : datetime .now (timezone .utc ).isoformat (),
2780+ "monitoring_timestamp" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
27812781 }
27822782
27832783
@@ -3103,7 +3103,7 @@ async def _register_mcp_plugin(plugin_config: PluginConfig) -> dict[str, Any]:
31033103 "status" : "success" ,
31043104 "registered" : True ,
31053105 "plugin_id" : plugin_config .mcp_server_name ,
3106- "registration_time" : datetime .now (timezone .utc ).isoformat (),
3106+ "registration_time" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
31073107 "message" : f"Plugin { plugin_config .plugin_name } registered successfully" ,
31083108 }
31093109
@@ -3115,7 +3115,7 @@ async def _register_mcp_plugin(plugin_config: PluginConfig) -> dict[str, Any]:
31153115 "status" : "error" ,
31163116 "registered" : False ,
31173117 "error" : str (e ),
3118- "registration_time" : datetime .now (timezone .utc ).isoformat (),
3118+ "registration_time" : datetime .now (timezone .utc ).isoformat (), # noqa: UP017
31193119 }
31203120
31213121
0 commit comments