From 68f7c3ab434b5c0420234337e5912bdb02849cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Tue, 1 Oct 2024 00:03:21 +0200 Subject: [PATCH] Run ruff --- nixprstatus/__main__.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/nixprstatus/__main__.py b/nixprstatus/__main__.py index eaf4821..010e0d2 100644 --- a/nixprstatus/__main__.py +++ b/nixprstatus/__main__.py @@ -8,7 +8,8 @@ DEFAULT_HEADERS = { "Accept": "application/vnd.github.text+json", } -BRANCHES = [ "nixos-unstable-small", "nixos-unstable", "nixos-24.05" ] +BRANCHES = ["nixos-unstable-small", "nixos-unstable", "nixos-24.05"] + @app.command() def pr(pr: str): @@ -22,14 +23,13 @@ def pr(pr: str): console = Console() - if pr_data["merged"] == False: - console.print(f":x: master", highlight=False) + if pr_data["merged"] is False: + console.print(":x: master", highlight=False) for branch in BRANCHES: console.print(f":x: {branch}", highlight=False) return - - console.print(f":white_check_mark: master", highlight=False) + console.print(":white_check_mark: master", highlight=False) commit_sha = pr_data["merge_commit_sha"] @@ -39,13 +39,15 @@ def pr(pr: str): commit_response.raise_for_status() status = commit_response.json().get("status") - if status in [ "identical", "behind" ]: + if status in ["identical", "behind"]: console.print(f":white_check_mark: {branch}", highlight=False) else: console.print(f":x: {branch}", highlight=False) + def main(): app() + if __name__ == "__main__": main()