fix: ignore Python install manager target files (Fixes #483) - #484
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Performance Report (Linux) ➖
Legend
|
Test Coverage Report (Linux)
Coverage increased! Great work! |
Performance Report (macOS)
Legend
|
Test Coverage Report (Windows)
Coverage increased! Great work! |
Performance Report (Windows) ✅
Legend
|
Copilot started reviewing on behalf of
Karthik Nadig (karthiknadig)
July 24, 2026 20:24
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates PET’s Python executable name detection (used during environment discovery) to avoid false positives on Windows, specifically excluding Python Install Manager .__target__ metadata files and tightening the Windows .exe match.
Changes:
- Anchor the Windows executable regex to require the filename to end with
.exe. - Ensure
.exe.__target__files are excluded from executable-name matching on Windows. - Add regression tests covering both unversioned and versioned
.__target__filenames.
Show a summary per file
| File | Description |
|---|---|
| crates/pet-python-utils/src/executable.rs | Tightens Windows executable name matching and adds regression tests to prevent treating .__target__ files as runnable Python executables. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Low
Karthik Nadig (karthiknadig)
marked this pull request as ready for review
July 24, 2026 20:28
Raymond Zhao (rzhao271)
approved these changes
Jul 24, 2026
Eleanor Boyd (eleanorjboyd)
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.exesuffix.__target__metadata files from discoveryValidation
cargo test -p pet-python-utils executable::tests::is_.\scripts\rust-precommit.ps1Fixes #483