Repository navigation
fix(igraph): pick the node ID column without a bookkeeping flag - #2098
Merged
Merged
Conversation
from_igraph's third branch, which un-swizzles integer vertex IDs, recorded success in a separate `found` boolean: node_id_col was bound inside the loop and read after it, with `if not found` as the only thing tying the two together. The name is in fact always bound -- every arm of the chain either assigns it or raises -- but nothing local says so, which is why it read as possibly unbound. Binding node_id_col = None up front and testing that instead says the same thing with one name rather than two, and the flag disappears. Behaviour verified rather than assumed: round-trips through igraph produce byte-identical edge frames on master and here for all three shapes that reach different arms -- named vertices, integer vids (the arm this touches), and a bare attribute-less graph. 37 igraph tests, 50 plugin tests. Also `pass` for a bare `1` used as a no-op, the same idiom cleared from PlotterBase in #2095. cugraph's findings are not here: they are GPU-only, so no lane feeding the changed-line gate can execute them, and they want dgx validation of their own. Pyright ratchet 245 -> 240 (-5). Changed-line coverage 3/3. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_017ropeBMLJUuy6ViYwy15ud
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.
Sixth of the pyright-ratchet cleanup series. Ratchet 245 → 240.
What
from_igraph's third branch — the one that un-swizzles integer vertex IDs — recorded success in a separatefoundboolean, sonode_id_colwas bound inside the loop and read after it, withif not foundas the only thing tying the two together.The name is in fact always bound: every arm of the chain either assigns it or raises
ValueError. But nothing local says so, which is why it read as possibly unbound. Bindingnode_id_col = Noneup front and testing that instead says the same thing with one name rather than two, and the flag disappears.Also
passfor a bare1used as a no-op — the same idiom cleared fromPlotterBasein #2095.Verification
Behaviour checked rather than assumed. Round-trips through igraph produce byte-identical edge frames on master and here, for all three shapes that reach different arms of the chain:
node_col in ig_vs_dflen(ig_vs_df.columns) == 0bin/lint.sh(ruff, type-hygiene 4448, comment-density 1151) · pyright guard 240 · mypy 351 files · changed-line coverage 3/3 = 100% · 37 igraph tests, 50 plugin tests.Coverage is real here rather than pragma'd:
test-core-pythoninstalls igraph via thetest-corelockfile and uploads the artifact the changed-line gate consumes.Not here
cugraph's eight findings are GPU-only, so no lane feeding the changed-line gate can execute them and they want dgx validation of their own. They follow separately rather than riding along behind pragmas.
🤖 Generated with Claude Code
https://claude.ai/code/session_017ropeBMLJUuy6ViYwy15ud