Skip to content

Commit b97aed3

Browse files
eumiroSILIZ4
authored andcommitted
Fix some typos in docs and test function names (Qiskit#1398)
1 parent c5a327e commit b97aed3

File tree

14 files changed

+24
-24
lines changed

14 files changed

+24
-24
lines changed

rustworkx-core/src/bipartite_coloring.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ fn euler_cycles(input_graph: &EdgedGraph) -> Vec<Vec<EdgeIndex>> {
178178
}
179179

180180
/// Splits a regular bipartite multigraph g of even degree 2k into two regular
181-
/// bipartte multigraphs h0 and h1 of degree k.
181+
/// bipartite multigraphs h0 and h1 of degree k.
182182
fn rbmg_split_into_two(
183183
g: &RegularBipartiteMultiGraph,
184184
) -> (RegularBipartiteMultiGraph, RegularBipartiteMultiGraph) {
@@ -904,7 +904,7 @@ mod test_bipartite_coloring {
904904
match bipartite_edge_color(&graph) {
905905
Ok(edge_coloring) => {
906906
check_edge_coloring_undirected(&graph, &edge_coloring, Some(3));
907-
// check_bipatite_edge_coloring_is_valid(&graph, &edge_coloring, Some(3));
907+
// check_bipartite_edge_coloring_is_valid(&graph, &edge_coloring, Some(3));
908908
}
909909
Err(_) => panic!("This should error"),
910910
}

rustworkx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class PyDAG(PyDiGraph):
123123
124124
:param bool check_cycle: When this is set to ``True`` the created
125125
``PyDAG`` has runtime cycle detection enabled.
126-
:param bool multgraph: When this is set to ``False`` the created
126+
:param bool multigraph: When this is set to ``False`` the created
127127
``PyDAG`` object will not be a multigraph. When ``False`` if a method
128128
call is made that would add parallel edges the weight/weight from
129129
that method call will be used to update the existing edge in place.

rustworkx/rustworkx.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ class TopologicalSorter:
359359
def get_ready(self) -> list[int]: ...
360360
def done(self, nodes: int | Sequence[int]) -> None: ...
361361

362-
# isomorpism
362+
# isomorphism
363363

364364
def digraph_is_isomorphic(
365365
first: PyDiGraph[_S, _T],

src/graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ impl PyGraph {
16101610
/// single node weight/data object and return a new node weight/data
16111611
/// object that will be used when adding an node from other onto this
16121612
/// graph.
1613-
/// :param Callable edge_map_func: An optional python callabble that will take in a
1613+
/// :param Callable edge_map_func: An optional python callable that will take in a
16141614
/// single edge weight/data object and return a new edge weight/data
16151615
/// object that will be used when adding an edge from other onto this
16161616
/// graph.

src/graphml.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ impl GraphML {
728728
///
729729
/// .. note::
730730
///
731-
/// This implementation does not support mixed graphs (directed and unidirected edges together),
731+
/// This implementation does not support mixed graphs (directed and undirected edges together),
732732
/// hyperedges, nested graphs, or ports.
733733
///
734734
/// .. note::

src/iterators.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,8 +1163,8 @@ custom_vec_iter_impl!(
11631163
a_partition_block = partition[0]
11641164
# Use as iterator
11651165
partition_iter = iter(partition)
1166-
another_block = next(parititon_iter)
1167-
the_second_block = next(parititon_iter)
1166+
another_block = next(partition_iter)
1167+
the_second_block = next(partition_iter)
11681168
"
11691169
);
11701170
impl PyGCProtocol for RelationalCoarsestPartition {}

src/matching/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ use crate::weight_callable;
5656
/// solution is optimum. If set to true an exception will be raised if
5757
/// the found solution is not optimum. This is mostly useful for testing.
5858
///
59-
/// :returns: A set of tuples ofthe matching, Note that only a single
59+
/// :returns: A set of tuples of the matching, Note that only a single
6060
/// direction will be listed in the output, for example:
6161
/// ``{(0, 1),}``.
6262
/// :rtype: set

src/shortest_path/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ pub fn graph_astar_shortest_path(
792792
/// :param int start: The node index to find the shortest paths from
793793
/// :param int k: The kth shortest path to find the lengths of
794794
/// :param edge_cost: A python callable that will receive an edge payload and
795-
/// return a float for the cost of that eedge
795+
/// return a float for the cost of that edge
796796
/// :param int goal: An optional goal node index, if specified the output
797797
/// dictionary
798798
///
@@ -852,7 +852,7 @@ pub fn digraph_k_shortest_path_lengths(
852852
/// :param int start: The node index to find the shortest paths from
853853
/// :param int k: The kth shortest path to find the lengths of
854854
/// :param edge_cost: A python callable that will receive an edge payload and
855-
/// return a float for the cost of that eedge
855+
/// return a float for the cost of that edge
856856
/// :param int goal: An optional goal node index, if specified the output
857857
/// dictionary
858858
///

tests/digraph/test_bipartite.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@ def test_is_bipartite_with_isolates(self):
4040
graph.add_nodes_from(range(3))
4141
self.assertTrue(rustworkx.is_bipartite(graph))
4242

43-
def test_two_colors_not_biparite_with_isolates(self):
43+
def test_two_colors_not_bipartite_with_isolates(self):
4444
graph = rustworkx.generators.directed_complete_graph(5)
4545
graph.add_nodes_from(range(3))
4646
self.assertIsNone(rustworkx.two_color(graph))
4747

48-
def test_not_biparite_with_isolates(self):
48+
def test_not_bipartite_with_isolates(self):
4949
graph = rustworkx.generators.directed_complete_graph(5)
5050
graph.add_nodes_from(range(3))
5151
self.assertFalse(rustworkx.is_bipartite(graph))
5252

53-
def test_not_biparite(self):
53+
def test_not_bipartite(self):
5454
graph = rustworkx.generators.directed_complete_graph(5)
5555
self.assertFalse(rustworkx.is_bipartite(graph))
5656

57-
def test_two_color_not_biparite(self):
57+
def test_two_color_not_bipartite(self):
5858
graph = rustworkx.generators.directed_complete_graph(5)
5959
self.assertIsNone(rustworkx.two_color(graph))
6060

tests/digraph/test_nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def test_remove_nodes_retain_edges_by_id_broadcast(self):
243243
(nodes["d"], nodes["f"], weights[1]),
244244
}
245245

246-
# 2:2 broadacst
246+
# 2:2 broadcast
247247
dag.add_edge(nodes["g"], mid, weights[2])
248248
dag.add_edge(nodes["h"], mid, weights[2])
249249
dag.add_edge(mid, nodes["i"], weights[2])
@@ -316,7 +316,7 @@ def test_remove_nodes_retain_edges_by_key_broadcast_mod_map(self):
316316
expected_edges[nodes["d"], nodes["e"]] = allowed_weights
317317
expected_edges[nodes["d"], nodes["f"]] = allowed_weights
318318

319-
# 2:2 broadacst
319+
# 2:2 broadcast
320320
dag.add_edge(nodes["g"], mid, 12)
321321
dag.add_edge(nodes["h"], mid, 22)
322322
dag.add_edge(mid, nodes["i"], 32)

0 commit comments

Comments
 (0)