Skip to content

Commit 7af4f7e

Browse files
committed
[#126]: Fix pylint warning
1 parent ef51102 commit 7af4f7e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/sa_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def create_or_edit_comment(comment_body):
318318
pull_request.create_issue_comment(body=comment_body)
319319

320320

321-
def generate_output(is_note, file_path, file_line_start, file_line_end, description, prefix=""):
321+
def generate_output(is_note, prefix_and_file_path, file_line_start, file_line_end, description):
322322
"""
323323
Generate a formatted output string based on the details of a code issue.
324324
@@ -344,6 +344,7 @@ def generate_output(is_note, file_path, file_line_start, file_line_end, descript
344344
"""
345345

346346
if not is_note:
347+
prefix, file_path = prefix_and_file_path
347348
if TARGET_REPO_NAME != REPO_NAME:
348349
if file_path not in FILES_WITH_ISSUES:
349350
try:

src/static_analysis_cpp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def create_comment_for_output(
6464
)
6565
was_note = is_note
6666
new_line = utils.generate_output(
67-
is_note, file_path, file_line_start, file_line_end, description, prefix
67+
is_note, (prefix, file_path), file_line_start, file_line_end, description
6868
)
6969

7070
if utils.check_for_char_limit(new_line):

src/static_analysis_python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def create_comment_for_output(tool_output, files_changed_in_pr, output_to_consol
104104
)
105105

106106
new_line = utils.generate_output(
107-
False, file_path, file_line_start, file_line_end, description
107+
False, ("", file_path), file_line_start, file_line_end, description
108108
)
109109

110110
if utils.check_for_char_limit(new_line):

0 commit comments

Comments
 (0)