Skip to content

Commit 3b5043b

Browse files
Merge pull request #777 from microsoft/psl-codeql
fix: fixed code quality issues
2 parents 49a54da + 112b00c commit 3b5043b

7 files changed

Lines changed: 15 additions & 32 deletions

File tree

src/backend/v4/api/router.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,8 @@ async def plan_approval(
501501
logging.warning(f"Failed to send WebSocket error: {ws_error}")
502502
raise HTTPException(status_code=500, detail="Internal server error")
503503

504+
return None
505+
504506

505507
@app_v4.post("/user_clarification")
506508
async def user_clarification(
@@ -639,6 +641,8 @@ async def user_clarification(
639641
status_code=404, detail="No active plan found for clarification"
640642
)
641643

644+
return None
645+
642646

643647
@app_v4.post("/agent_message")
644648
async def agent_message_user(

src/backend/v4/common/services/team_service.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,6 @@ async def get_team_configuration(
207207
if team_config is None:
208208
return None
209209

210-
# Verify the configuration belongs to the user
211-
# if team_config.user_id != user_id:
212-
# self.logger.warning(
213-
# "Access denied: config %s does not belong to user %s",
214-
# team_id,
215-
# user_id,
216-
# )
217-
# return None
218-
219210
return team_config
220211

221212
except (KeyError, TypeError, ValueError) as e:

src/backend/v4/magentic_agents/common/lifecycle.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -413,13 +413,6 @@ async def close(self) -> None:
413413
optionally delete the agent definition here.
414414
"""
415415
try:
416-
# Example optional clean up of an agent id:
417-
# if self._agent and isinstance(self._agent, AzureAIAgentClient) and self._agent._should_delete_agent:
418-
# try:
419-
# if self.client and self._agent.agent_id:
420-
# await self.client.agents.delete_agent(self._agent.agent_id)
421-
# except Exception:
422-
# pass
423416

424417
# Close underlying client via base close
425418
if self._agent and hasattr(self._agent, "close"):

src/frontend/src/components/common/TeamSelector.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -704,18 +704,16 @@ const TeamSelector: React.FC<TeamSelectorProps> = ({
704704
</DialogContent>
705705

706706

707-
{tempSelectedTeam && (
708-
<div className={styles.dialogActions}>
709-
<Button
710-
appearance="primary"
711-
onClick={handleContinue}
712-
disabled={!tempSelectedTeam || selectionLoading}
713-
className={styles.continueButton}
714-
>
715-
{selectionLoading ? 'Selecting...' : 'Continue'}
716-
</Button>
717-
</div>
718-
)}
707+
<div className={styles.dialogActions}>
708+
<Button
709+
appearance="primary"
710+
onClick={handleContinue}
711+
disabled={!tempSelectedTeam || selectionLoading}
712+
className={styles.continueButton}
713+
>
714+
{selectionLoading ? 'Selecting...' : 'Continue'}
715+
</Button>
716+
</div>
719717
</DialogSurface>
720718
</Dialog>
721719

src/frontend/src/components/content/PlanPanelLeft.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import { getUserInfoGlobal } from "@/api/config";
2626
import TeamSelector from "../common/TeamSelector";
2727
import { TeamConfig } from "../../models/Team";
2828
import TeamSelected from "../common/TeamSelected";
29-
import TeamService from "@/services/TeamService";
3029

3130
const PlanPanelLeft: React.FC<PlanPanelLefProps> = ({
3231
reloadTasks,
@@ -100,7 +99,7 @@ const PlanPanelLeft: React.FC<PlanPanelLefProps> = ({
10099
}, [loadPlansData, setUserInfo, reloadTasks]);
101100
useEffect(() => {
102101
if (plans) {
103-
const { inProgress, completed } =
102+
const { completed } =
104103
TaskService.transformPlansToTasks(plans);
105104
setCompletedTasks(completed);
106105
}

src/frontend/src/pages/HomePage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useEffect, useState, useCallback } from 'react';
2-
import { useNavigate } from 'react-router-dom';
32
import {
43
Spinner
54
} from '@fluentui/react-components';

tests/e2e-test/tests/test_MACAE_Smoke_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ def test_retail_customer_success_workflow(login_logout, request):
9494
logger.info("STEP 5: Approving Retail Task Plan")
9595
logger.info("=" * 80)
9696
step5_start = time.time()
97-
step5_retry_attempted = False
9897
try:
9998
biab_page.approve_retail_task_plan()
10099
step5_end = time.time()

0 commit comments

Comments
 (0)