Skip to content

Commit f6915b1

Browse files
Merge pull request #362 from microsoft/psl-cd-codeQl-fix
fix: codeQL issues
2 parents 2d554d6 + e4a976d commit f6915b1

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

src/frontend/src/pages/batchView.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ const BatchStoryPage = () => {
7373
const [selectedFileId, setSelectedFileId] = useState<string>("");
7474
const [expandedSections, setExpandedSections] = useState(["errors"]);
7575
const [batchSummary, setBatchSummary] = useState<BatchSummary | null>(null);
76-
const [selectedFileContent, setSelectedFileContent] = useState<string>("");
7776
const [selectedFileTranslatedContent, setSelectedFileTranslatedContent] = useState<string>("");
7877

7978

@@ -195,7 +194,6 @@ const BatchStoryPage = () => {
195194
const data = await response.json();
196195

197196
if (data) {
198-
setSelectedFileContent(data.content || "");
199197
setSelectedFileTranslatedContent(data.translated_content || "");
200198
}
201199

src/frontend/src/pages/modernizationPage.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,6 @@ const ModernizationPage = () => {
497497
const [fileId, setFileId] = React.useState<string>("");
498498
const [expandedSections, setExpandedSections] = React.useState<string[]>([]);
499499
const [allFilesCompleted, setAllFilesCompleted] = useState(false);
500-
const [progressPercentage, setProgressPercentage] = useState(0);
501500
const [isZipButtonDisabled, setIsZipButtonDisabled] = useState(true);
502501
const [fileLoading, setFileLoading] = useState(false);
503502
const [lastActivityTime, setLastActivityTime] = useState<number>(Date.now());
@@ -1014,16 +1013,16 @@ useEffect(() => {
10141013
};
10151014
}, [handleWebSocketMessage]);
10161015

1017-
// Set a timeout for initial loading - if no progress after 30 seconds, show error
1016+
// Set a timeout for initial loading - if still loading after 30 seconds, show a warning message
10181017
useEffect(() => {
10191018
const loadingTimeout = setTimeout(() => {
1020-
if (progressPercentage < 5 && showLoading) {
1019+
if (showLoading) {
10211020
setLoadingError('Processing is taking longer than expected. You can continue waiting or try again later.');
10221021
}
10231022
}, 30000);
10241023

10251024
return () => clearTimeout(loadingTimeout);
1026-
}, [progressPercentage, showLoading]);
1025+
}, [showLoading]);
10271026

10281027
// Add timeout mechanism to navigate if no activity for 30 seconds
10291028
useEffect(() => {

src/tests/backend/sql_agents/convert_script_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ async def test_convert_script_cleanup_always_runs(self):
187187
mock_sql_agents
188188
)
189189
except RuntimeError:
190-
pass
190+
pass # Expected exception; verifying cleanup below
191191

192192
# Cleanup should be called even on exception
193193
mock_comms_manager.cleanup.assert_called_once()

tests/e2e-test/pages/HomePage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class HomePage(BasePage):
5252
HARMFUL_FILE_2 = "//span[.='harmful_content_2 2.sql']"
5353

5454
def __init__(self, page):
55-
self.page = page
55+
super().__init__(page)
5656

5757
def navigate_to_base_url(self):
5858
"""

tests/e2e-test/pages/loginPage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class LoginPage(BasePage):
1111
PERMISSION_ACCEPT_BUTTON = "//input[@type='submit']"
1212

1313
def __init__(self, page):
14-
self.page = page
14+
super().__init__(page)
1515

1616
def authenticate(self, username, password):
1717
# login with username and password in web url

0 commit comments

Comments
 (0)