chore: remove obsolete FIXME comments from bipartite tests - #15107
chore: remove obsolete FIXME comments from bipartite tests#15107dwaddle wants to merge 1 commit into
Conversation
|
@priya-sundaram-dev, your review. please. Compare with #15210 (review) |
priya-sundaram-dev
left a comment
There was a problem hiding this comment.
Reviewed, @cclauss — this one is a clean approve from me, and it's a nice contrast with #15210.
Both PRs target the same FIXME comments in check_bipatrite.py, but they take opposite approaches:
- #15210 deleted the guards (
if node not in graph: ...) that the FIXMEs sat next to. As I noted there, those guards are load-bearing — they make an ordinary adjacency dict where a node appears as a neighbor but is omitted as a key (a sink with no out-edges) work correctly. Removing them breaks 13 existing doctests and CI goes red. - #15107 deletes only the comments, leaving the working code untouched.
That's the right call, because the FIXMEs were simply wrong: they claimed the adjacent doctests "should fail with KeyError / TypeError", but those inputs are handled gracefully and the doctests already assert the correct False/True results. So the comments were stale/misleading, not a real TODO. Removing them is documentation cleanup with zero behavior change.
Verified locally on this branch: pure deletions (no code touched), and python -m doctest graphs/check_bipatrite.py → 30 passed, 0 failed. CI here is green across build / build_docs / ruff / pre-commit.
LGTM. 👍 If we want to also honor the literal ask in #15127 (let invalid graphs raise), that's a separate design decision — it would need the doctests rewritten to # doctest: +IGNORE_EXCEPTION_DETAIL style expected-exception blocks — and shouldn't block this cleanup.
Describe your change:
Removed 4 obsolete
FIXMEcomments fromgraphs/check_bipatrite.pythat were left behind in a previous PR (#10708). The bugs they referenced (KeyErrorandTypeError) were already fixed at that time by migrating to adefaultdictand adding node existence checks, making theseFIXMEcomments and tracebacks redundant. No functional code or tests were changed.Checklist: