Repository navigation
refactor: adjacent() is the canonical name; neighbours/neighbors are aliases - #37
Merged
Merged
Conversation
…silent aliases Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…aliases 'Adjacent' is the graph-theory term and has one spelling, which removes the UK/US split at the root: neighbours and neighbors were two separate methods with duplicated bodies and docstrings, isneighbour had no US form, and adjacent had been left deprecated. - adjacent() is the method; neighbours and neighbors are class attributes bound to it, so they are the same function and do not warn - isadjacent() likewise, with isneighbour and isneighbor as aliases - adjacent() is documented as the relation adjacency() tabulates: row i of the adjacency matrix is non-zero at the vertices g[i].adjacent() returns - the package's own calls use the canonical name No behaviour changes, and nothing that worked before stops working; the only visible difference is that adjacent() no longer emits a DeprecationWarning. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 12 |
| Duplication | 3 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #37 +/- ##
==========================================
+ Coverage 93.54% 93.63% +0.08%
==========================================
Files 3 3
Lines 1054 1053 -1
==========================================
Hits 986 986
+ Misses 68 67 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
"Adjacent" is the graph-theory term and has one spelling, which removes the UK/US split at the root.
neighboursandneighborswere two methods with duplicated bodies and docstrings,isneighbourhad no US form, andadjacenthad been left deprecated.adjacent()is the method;neighboursandneighborsare aliases bound to it, so they are the same function and do not warn (they are spelling variants, not a different concept).isadjacent()likewise, withisneighbourandisneighboras aliases.adjacent()is documented as the relationadjacency()tabulates: row i of the adjacency matrix is non-zero at the verticesg[i].adjacent()returns.Nothing that worked before stops working; the only visible difference is that
adjacent()no longer emits aDeprecationWarning.Tests
tests/test_adjacent.py: every alias returns the same result asadjacent()for both graph kinds, including parallel edges and self-loops, and none of them warns.🤖 Generated with Claude Code