Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/stacky/stacky.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import subprocess
import sys
from argparse import ArgumentParser
from typing import List, Optional, Tuple
from typing import List, Optional

import asciitree
import colors
Expand Down Expand Up @@ -246,7 +246,11 @@ def get_pr_info(branch, *, full=False):
infos = {info["id"]: info for info in infos}
open_prs = [info for info in infos.values() if info["state"] == "OPEN"]
if len(open_prs) > 1:
die("Branch {} has more than one open PR: {}", branch, ", ".join(open_prs))
die(
"Branch {} has more than one open PR: {}",
branch,
", ".join([str(pr) for pr in open_prs]),
)
return infos, open_prs[0] if open_prs else None


Expand Down
5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
ignore = D203, E501, W503, E203
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
max-complexity = 10
max-line-length = 120