Skip to content

Commit 6c99666

Browse files
tamasvajkredsun82
andcommitted
Apply suggestions from code review - code quality improvements
Co-authored-by: Paolo Tranquilli <redsun82@github.com>
1 parent b29b60a commit 6c99666

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

misc/pytest/lib/query_suites.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
@pytest.fixture
66
def check_query_suite(codeql, cwd, expected_files, semmle_code_dir):
77
def ret(query_suite):
8-
actual = codeql.resolve.queries(query_suite, _capture=True).strip()
8+
actual = codeql.resolve.queries(query_suite, _capture=True)
99
actual = sorted(actual.splitlines())
1010
actual = [os.path.relpath(q, semmle_code_dir) for q in actual]
1111
actual_file_name = query_suite + '.actual'
1212
expected_files.add(actual_file_name)
13-
(cwd / actual_file_name).write_text('\n'.join(actual)+'\n')
13+
(cwd / actual_file_name).write_text('\n'.join(actual) + '\n')
1414
return ret
1515

1616
@pytest.fixture
1717
def check_queries_not_included(codeql, cwd, expected_files, semmle_code_dir):
1818
def ret(lang_folder_name, query_suites):
19-
all_queries = codeql.resolve.queries(semmle_code_dir / 'ql' / lang_folder_name / 'ql' / 'src', _capture=True).strip().splitlines()
19+
all_queries = codeql.resolve.queries(semmle_code_dir / 'ql' / lang_folder_name / 'ql' / 'src', _capture=True).splitlines()
2020

2121
included_in_qls = set()
2222
for query_suite in query_suites:
@@ -26,5 +26,5 @@ def ret(lang_folder_name, query_suites):
2626
not_included = [os.path.relpath(q, semmle_code_dir) for q in not_included]
2727
not_included_file_name = 'not_included_in_qls.actual'
2828
expected_files.add(not_included_file_name)
29-
(cwd / not_included_file_name).write_text('\n'.join(not_included)+'\n')
29+
(cwd / not_included_file_name).write_text('\n'.join(not_included) + '\n')
3030
return ret

0 commit comments

Comments
 (0)