diff options
author | Miroslav Šedivý <6774676+eumiro@users.noreply.github.com> | 2021-04-11 23:30:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-11 22:30:45 +0100 |
commit | 963f7c548e044d48e68002bd5d99cdf495c5ac7e (patch) | |
tree | dee7893f5d7eaa0ff7cdcd2980dca01cb3c02bf0 /tasks | |
parent | 931159940c55f960b68c3dc1324150c2093e84d6 (diff) | |
download | tox-git-963f7c548e044d48e68002bd5d99cdf495c5ac7e.tar.gz |
Minor code improvements (#2017)
* Use !r to repr strings
* Simplify loops and expressions
* Improve exception traceback
* Add Python 3.10 to installation.rst
Diffstat (limited to 'tasks')
-rw-r--r-- | tasks/release.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tasks/release.py b/tasks/release.py index 5e739109..b060ffcc 100644 --- a/tasks/release.py +++ b/tasks/release.py @@ -39,9 +39,8 @@ def create_release_branch(repo: Repo, version: Version) -> Tuple[Remote, Head]: def get_upstream(repo: Repo) -> Remote: for remote in repo.remotes: - for url in remote.urls: - if url.endswith("tox-dev/tox.git"): - return remote + if any(url.endswith("tox-dev/tox.git") for url in remote.urls): + return remote raise RuntimeError("could not find tox-dev/tox.git remote") |