Skip to content

Commit ea455ed

Browse files
committed
Address CodeQL module import issues
1 parent a759166 commit ea455ed

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

scripts/reports/codeql.py renamed to scripts/reports/codeqlvalidation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
script_path = Path(__file__)
66
# Add the shared modules to the path so we can import them.
7-
sys.path.append(script_path.parent.parent / 'shared')
7+
sys.path.append(str(script_path.parent.parent / 'shared'))
88
from codeql import CodeQL
99

1010

scripts/reports/deviations.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
from contextlib import redirect_stdout
22
from pathlib import Path
3-
from codeql import CodeQLError, CodeQLValidationSummary
3+
from codeqlvalidation import CodeQLValidationSummary
44
from error import failure
55
import re
6+
import sys
7+
8+
script_path = Path(__file__)
9+
# Add the shared modules to the path so we can import them.
10+
sys.path.append(str(script_path.parent.parent / 'shared'))
11+
from codeql import CodeQLError
12+
613

714
if __name__ == '__main__':
815
failure("Error: this Python module does not support standalone execution!")

scripts/reports/diagnostics.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
from contextlib import redirect_stdout
22
from pathlib import Path
3-
from codeql import CodeQLError, CodeQLValidationSummary
3+
from codeqlvalidation import CodeQLValidationSummary
44
from error import failure
5+
import sys
56

7+
script_path = Path(__file__)
8+
# Add the shared modules to the path so we can import them.
9+
sys.path.append(str(script_path.parent.parent / 'shared'))
10+
from codeql import CodeQLError
611

712
class DiagnosticsSummary:
813
def __init__(self, database_path, repo_root):

0 commit comments

Comments
 (0)