Skip to content

Commit d98e26a

Browse files
dan-blanchardclaude
andcommitted
fix: use project_root parameter instead of pip_args[0] in _resolve_version_without_venv
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5a85c25 commit d98e26a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/compare_detectors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def _get_build_tag(python_executable: str, detector_type: str) -> str:
193193
def _resolve_version_without_venv(
194194
detector_type: str,
195195
pip_args: list[str],
196-
project_root: str, # noqa: ARG001
196+
project_root: str,
197197
) -> str:
198198
"""Resolve a detector's version without creating a venv.
199199
@@ -206,7 +206,7 @@ def _resolve_version_without_venv(
206206
return pip_args[0].split("==", 1)[1]
207207

208208
# Local chardet: query the existing dev install
209-
if detector_type == "chardet" and len(pip_args) == 1 and Path(pip_args[0]).is_dir():
209+
if detector_type == "chardet" and Path(project_root).is_dir():
210210
fd, tmp_path = tempfile.mkstemp(suffix=".py")
211211
tmp = Path(tmp_path)
212212
try:
@@ -217,7 +217,7 @@ def _resolve_version_without_venv(
217217
capture_output=True,
218218
text=True,
219219
check=True,
220-
cwd=pip_args[0],
220+
cwd=project_root,
221221
)
222222
return result.stdout.strip()
223223
except subprocess.CalledProcessError:

0 commit comments

Comments
 (0)