Mercurial > public > mercurial-scm > hg-stable
diff tests/hghave.py @ 52700:1f76fd3e9f7f
hghave: drop redundant parentheses
Even fewer complaints from PyCharm now.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 12 Jan 2025 20:05:25 -0500 |
parents | e1c5d823287b |
children | 3c6460c0586f |
line wrap: on
line diff
--- a/tests/hghave.py Sun Jan 12 19:57:58 2025 -0500 +++ b/tests/hghave.py Sun Jan 12 20:05:25 2025 -0500 @@ -349,8 +349,8 @@ def _gethgversion(): m = matchoutput('hg --version --quiet 2>&1', br'(\d+)\.(\d+)') if not m: - return (0, 0) - return (int(m.group(1)), int(m.group(2))) + return 0, 0 + return int(m.group(1)), int(m.group(2)) _hgversion = None @@ -418,8 +418,8 @@ def getgitversion(): m = matchoutput('git --version 2>&1', br'git version (\d+)\.(\d+)') if not m: - return (0, 0) - return (int(m.group(1)), int(m.group(2))) + return 0, 0 + return int(m.group(1)), int(m.group(2)) @check("pygit2", "pygit2 Python library") @@ -465,8 +465,8 @@ def getsvnversion(): m = matchoutput('svn --version --quiet 2>&1', br'^(\d+)\.(\d+)') if not m: - return (0, 0) - return (int(m.group(1)), int(m.group(2))) + return 0, 0 + return int(m.group(1)), int(m.group(2)) @checkvers("svn", "subversion client and admin tools >= %s", ('1.3', '1.5')) @@ -661,9 +661,9 @@ v = pygments.__version__ parts = v.split(".") - return (int(parts[0]), int(parts[1])) + return int(parts[0]), int(parts[1]) except ImportError: - return (0, 0) + return 0, 0 @checkvers("pygments", "Pygments version >= %s", ('2.5', '2.11', '2.14'))