summaryrefslogtreecommitdiff
path: root/networkx
diff options
context:
space:
mode:
authorYaroslav Halchenko <debian@onerussian.com>2023-05-03 13:42:14 -0400
committerGitHub <noreply@github.com>2023-05-03 13:42:14 -0400
commitc051696edfda4fb0cf27298259b723c57459ab60 (patch)
tree004416cefaafb2ee20a86cd10f3dd710d6361a9c /networkx
parent5dc9640142cac3642e0bed121bb6a8bfee4ef96e (diff)
downloadnetworkx-c051696edfda4fb0cf27298259b723c57459ab60.tar.gz
codespell: pre-commit, config, typos fixed (#6662)
* One ambigous typo * one more ambigous typo * [DATALAD RUNCMD] run codespell throughout === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ For this to work -- it would require configuration files which were abandoned. See https://github.com/networkx/networkx/pull/6662 for more discussion etc. * Manual reversion of perform... "fix"
Diffstat (limited to 'networkx')
-rw-r--r--networkx/algorithms/approximation/matching.py2
-rw-r--r--networkx/algorithms/isomorphism/tree_isomorphism.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/networkx/algorithms/approximation/matching.py b/networkx/algorithms/approximation/matching.py
index 17a52eda..6a60b11b 100644
--- a/networkx/algorithms/approximation/matching.py
+++ b/networkx/algorithms/approximation/matching.py
@@ -31,7 +31,7 @@ def min_maximal_matching(G):
Notes
-----
- The algorithm computes an approximate solution fo the minimum maximal
+ The algorithm computes an approximate solution for the minimum maximal
cardinality matching problem. The solution is no more than 2 * OPT in size.
Runtime is $O(|E|)$.
diff --git a/networkx/algorithms/isomorphism/tree_isomorphism.py b/networkx/algorithms/isomorphism/tree_isomorphism.py
index 372224ca..1ff9f004 100644
--- a/networkx/algorithms/isomorphism/tree_isomorphism.py
+++ b/networkx/algorithms/isomorphism/tree_isomorphism.py
@@ -269,11 +269,11 @@ def tree_isomorphism(t1, t2):
# If there both have 2 centers, then try the first for t1
# with the first for t2.
- attemps = rooted_tree_isomorphism(t1, center1[0], t2, center2[0])
+ attempts = rooted_tree_isomorphism(t1, center1[0], t2, center2[0])
# If that worked we're done.
- if len(attemps) > 0:
- return attemps
+ if len(attempts) > 0:
+ return attempts
# Otherwise, try center1[0] with the center2[1], and see if that works
return rooted_tree_isomorphism(t1, center1[0], t2, center2[1])