From 0622511a3fc8127d6896ca970b2b1cbdd3a42546 Mon Sep 17 00:00:00 2001 From: Manuel Jacob Date: Wed, 11 Jun 2025 18:01:42 +0200 Subject: [PATCH] chore: remove redundant call to require_command() In 560a1cb5ff3a3c052e3641034476a3b0554edb86, the call to require_command() was moved from HgWorkdir.from_potential_worktree() to the caller. That caller is the only caller of GitWorkdirHgClient.from_potential_worktree() as well, so it is redundant and can be removed. --- src/setuptools_scm/hg_git.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/setuptools_scm/hg_git.py b/src/setuptools_scm/hg_git.py index 9cab6f45..0bee03df 100644 --- a/src/setuptools_scm/hg_git.py +++ b/src/setuptools_scm/hg_git.py @@ -9,7 +9,6 @@ from . import _types as _t from ._run_cmd import CompletedProcess as _CompletedProcess -from ._run_cmd import require_command from ._run_cmd import run as _run from .git import GitWorkdir from .hg import HgWorkdir @@ -28,7 +27,6 @@ class GitWorkdirHgClient(GitWorkdir, HgWorkdir): @classmethod def from_potential_worktree(cls, wd: _t.PathT) -> GitWorkdirHgClient | None: - require_command("hg") res = _run(["hg", "root"], cwd=wd).parse_success(parse=Path) if res is None: return None