diff --git a/src/stacky/stacky.py b/src/stacky/stacky.py index 26c1a0b..2e5a1f1 100755 --- a/src/stacky/stacky.py +++ b/src/stacky/stacky.py @@ -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 @@ -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 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..71d17ce --- /dev/null +++ b/tox.ini @@ -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