Skip to content

Commit

Permalink
chore: reduce stdout spam, use walrus
Browse files Browse the repository at this point in the history
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
  • Loading branch information
akhilnarang committed Feb 18, 2025
1 parent 9daf668 commit 905e033
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions dumpyarabot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,16 @@ def _is_matching_build(
build: schemas.JenkinsBuild, args: schemas.DumpArguments
) -> bool:
"""Check if a build matches the given arguments."""
console.print("[blue]Checking build parameters match...[/blue]")
for action in build.actions:
if "parameters" in action:
params = {param["name"]: param["value"] for param in action["parameters"]}
matches = (
if matches := (
params.get("URL") == args.url.unicode_string()
and params.get("USE_ALT_DUMPER") == args.use_alt_dumper
and params.get("ADD_BLACKLIST") == args.add_blacklist
)
if matches:
):
console.print("[green]Found matching build parameters[/green]")
return matches
return matches
return False


Expand Down

0 comments on commit 905e033

Please # to comment.