Skip to content

Commit c122cb1

Browse files
authored
Merge pull request #10 from JLLeitschuh/pixeebot/drip-2024-03-12-pixee-python/use-walrus-if
2 parents a9ad037 + 6d21588 commit c122cb1

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

delete_closed_or_merged_pr_forks.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ def read_results_data(json_file_name: str):
3838
data = read_results_data(file)
3939
project_name: str = data['project_name']
4040
print(f'loading project: {project_name}')
41-
pull_url = data['pull_request']
42-
if pull_url == '':
41+
if (pull_url := data['pull_request']) == '':
4342
continue
4443

4544

jhipster_security_fix.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ async def do_fix_vulnerable_file(self, project_name: str, file: str, expected_fi
7070
async with aiofiles.open(file, newline='') as vulnerableFile:
7171
contents: str = await vulnerableFile.read()
7272

73-
new_contents = await self.do_fix_file_contents(contents)
74-
if new_contents == contents:
73+
if (new_contents := await self.do_fix_file_contents(contents)) == contents:
7574
return 0
7675

7776
async with aiofiles.open(file, 'w', newline='') as vulnerableFile:

0 commit comments

Comments
 (0)