Skip to content

Commit

Permalink
Merge pull request #10 from JLLeitschuh/pixeebot/drip-2024-03-12-pixe…
Browse files Browse the repository at this point in the history
…e-python/use-walrus-if
  • Loading branch information
JLLeitschuh authored Mar 19, 2024
2 parents a9ad037 + 6d21588 commit c122cb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions delete_closed_or_merged_pr_forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ def read_results_data(json_file_name: str):
data = read_results_data(file)
project_name: str = data['project_name']
print(f'loading project: {project_name}')
pull_url = data['pull_request']
if pull_url == '':
if (pull_url := data['pull_request']) == '':
continue


Expand Down
3 changes: 1 addition & 2 deletions jhipster_security_fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ async def do_fix_vulnerable_file(self, project_name: str, file: str, expected_fi
async with aiofiles.open(file, newline='') as vulnerableFile:
contents: str = await vulnerableFile.read()

new_contents = await self.do_fix_file_contents(contents)
if new_contents == contents:
if (new_contents := await self.do_fix_file_contents(contents)) == contents:
return 0

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

0 comments on commit c122cb1

Please sign in to comment.