Repository navigation
Conversation
Callers told a hit from a miss with `isinstance(result, FindResult)`. Both result types now carry a `found` flag, so callers write `if result.found:` instead. The flag is typed as a literal `True` on `FindResult` and `False` on `NotFound`, so a type checker still narrows the type inside the `if`. To make that uniform, the two file probes in `search_platform.py` return a `FindResult` instead of a bare path, and `FindResult` moves there, next to `NotFound`. `search_steps.py` still exports it. No behavior change. 1291 passed, 6 skipped, and every comparison against `main` is still byte-identical, including simulated Windows. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Rob Parolin <rparolin@nvidia.com>
Contributor
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
This was referenced Nov 25, 2026
…hfinder-readability/12-result-found-flag Signed-off-by: Rob Parolin <rparolin@nvidia.com>
Collaborator
Author
|
Folded into #3607, where this code is introduced. Closing this one: it no longer has any changes. |
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.
Description
Part 12 of 12 of a readability stack for
cuda.pathfinder(stack: #3602 → #3603 → #3604 → #3605 → #3606 → #3607 → #3608 → #3609 → #3610 → #3611 → #3613 → #3614). No behavior change.Callers told a hit from a miss with
isinstance(result, FindResult). Both result types now carry afoundflag, so callers writeif result.found:instead. The flag is typed as a literalTrueonFindResultandFalseonNotFound, so a type checker still narrows the type inside theif.To make that uniform, the two file probes in
search_platform.pyreturn aFindResultinstead of a bare path, andFindResultmoves there, next toNotFound.search_steps.pystill exports it.No behavior change. 1291 passed, 6 skipped, and every comparison against
mainis still byte-identical, including simulated Windows.Testing
cuda_pathfindertest suite at this commit: 1291 passed, 6 skipped (Linux, Python 3.14).mypy-pathfinder.PLC Local Security Evidence (Advisory)
Local advisory checks only, run over the whole stack. Not release-gate results.
subprocess.runcall in the canary probe inload_nvidia_dynamic_lib.pyChecklist
🤖 Generated with Claude Code