Skip to content

Commit 039e8bf

Browse files
author
Release Manager
committed
gh-41157: fixing a few typos found using codespell ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. URL: #41157 Reported by: Frédéric Chapoton Reviewer(s):
2 parents 6dc6820 + b46509a commit 039e8bf

File tree

11 files changed

+29
-29
lines changed

11 files changed

+29
-29
lines changed

src/sage/cpython/dict_del_by_value.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def test_del_dictitem_by_exact_value(D, value, h):
147147
- ``h`` -- the hash of the key under which to find ``value`` in ``D``
148148
149149
The underlying cdef function deletes an item from ``D`` that is in the
150-
hash bucket determined by ``h`` and whose value is identic with
150+
hash bucket determined by ``h`` and whose value is identical with
151151
``value``. Of course, this only makes sense if the pairs ``(h, value)``
152152
corresponding to items in ``D`` are pair-wise distinct.
153153

src/sage/geometry/lattice_polytope.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,8 @@ def ReflexivePolytopes(dim):
450450
if _rp[dim] is None:
451451
db = DatabaseReflexivePolytopes()
452452
rp = read_all_polytopes(
453-
os.path.join(os.path.dirname(db.absolute_filename()),
454-
f'reflexive_polytopes_{dim}d'))
453+
os.path.join(os.path.dirname(db.absolute_filename()),
454+
f'reflexive_polytopes_{dim}d'))
455455
for n, p in enumerate(rp):
456456
# Data files have normal form of reflexive polytopes
457457
p.normal_form.set_cache(p._vertices)
@@ -760,7 +760,7 @@ def _compute_embedding(self) -> None:
760760
# Absolute value helps to keep normals "inner"
761761
self._dual_embedding_scale = abs(basis.det())
762762
dualbasis = matrix(ZZ, self._dual_embedding_scale * basis.inverse())
763-
self._dual_embedding_matrix = dualbasis.submatrix(0,0,M.ncols())
763+
self._dual_embedding_matrix = dualbasis.submatrix(0, 0, M.ncols())
764764

765765
def _compute_facets(self):
766766
r"""
@@ -4008,7 +4008,7 @@ def skeleton_show(self, normal=None):
40084008
raise NotImplementedError("skeleton view is implemented only in 3-d space")
40094009
if normal is None:
40104010
normal = [ZZ.random_element(20),ZZ.random_element(20),ZZ.random_element(20)]
4011-
normal = matrix(QQ,3,1,list(normal))
4011+
normal = matrix(QQ, 3, 1, list(normal))
40124012
projectionm = normal.kernel().basis_matrix()
40134013
positions = dict(enumerate([list(c) for c in (projectionm*self.points()).columns(copy=False)]))
40144014
self.skeleton().show(pos=positions)
@@ -4311,7 +4311,7 @@ def __init__(self, data, Delta_polar, check=True):
43114311
"""
43124312
if check and not Delta_polar.is_reflexive():
43134313
raise ValueError("nef-partitions can be constructed for reflexive "
4314-
"polytopes ony!")
4314+
"polytopes only!")
43154315
self._vertex_to_part = tuple(int(el) for el in data)
43164316
self._nparts = max(self._vertex_to_part) + 1
43174317
self._Delta_polar = Delta_polar
@@ -5646,7 +5646,7 @@ def positive_integer_relations(points):
56465646
# Use the new relation to remove negative entries in non-pivot columns
56475647
for i in range(n_nonpivots):
56485648
for j in range(n):
5649-
coef = relations[j,nonpivots[i]]
5649+
coef = relations[j, nonpivots[i]]
56505650
if coef < 0:
56515651
relations.add_multiple_of_row(j, n + i, -coef)
56525652
# Get a new basis

src/sage/graphs/generators/trees.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,9 +559,9 @@ cdef class TreeIterator:
559559
sig_free(self.l)
560560
sig_free(self.current_level_sequence)
561561

562-
def __str__(self):
562+
def __str__(self) -> str:
563563
r"""
564-
Return a string representaiton of ``self``.
564+
Return a string representation of ``self``.
565565

566566
EXAMPLES::
567567

src/sage/graphs/graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2937,7 +2937,7 @@ def is_chordal_bipartite(self, certificate=False):
29372937
(:meth:`~sage.graphs.bipartite_graph.BipartiteGraph.reduced_adjacency_matrix`)
29382938
of a bipartite graph has no cycle submatrix if and only if the graph is
29392939
chordal bipartite, where cycle submatrix is 0-1 `n \times n` matrix `n \geq 3`
2940-
with exactly two 1's in each row and column and no proper submatrix satsify
2940+
with exactly two 1's in each row and column and no proper submatrix satisfy
29412941
this property.
29422942
29432943
* A doubly lexical ordering

src/sage/graphs/matching_covered_graph.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,7 @@ def add_edges(self, edges, loops=False):
14561456
M.add_edges(self.get_matching())
14571457

14581458
# Check if M is a perfect matching of the resulting graph
1459-
if (G.order() != 2*M.size()):
1459+
if (G.order() != 2 * M.size()):
14601460
M = None
14611461

14621462
self.__init__(data=G, matching=M)
@@ -1974,7 +1974,7 @@ def delete_vertices(self, vertices):
19741974
# must be a valid perfect matching of the resulting graph obtained
19751975
# after the removal of the vertices
19761976

1977-
if (G.order() != 2*M.size()):
1977+
if (G.order() != 2 * M.size()):
19781978
M = None
19791979

19801980
self.__init__(data=G, matching=M)
@@ -2043,7 +2043,7 @@ def maximal_barrier(self, vertex):
20432043
20442044
And in order to find the vertices that do not lie in the maximal
20452045
barrier containing the provided vertex in linear time we take
2046-
inspiration of the `M` alternating tree seach method [LR2004]_.
2046+
inspiration of the `M` alternating tree search method [LR2004]_.
20472047
20482048
INPUT:
20492049
@@ -2825,8 +2825,8 @@ def dfs(x, visited, neighbor_iterator):
28252825

28262826
# Compute the nontrivial tight cut C := ∂(Y)
28272827
C = [(x, y, w) if x in X else (y, x, w)
2828-
for x, y, w in self.edge_iterator(sort_vertices=True)
2829-
if (x in X) ^ (y in X)]
2828+
for x, y, w in self.edge_iterator(sort_vertices=True)
2829+
if (x in X) ^ (y in X)]
28302830

28312831
# Obtain the barrier Z
28322832
Z = None

src/sage/interfaces/khoca.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
r"""
22
Interface to Khoca
33
4-
Khoca is computer program writen by Lukas Lewark to calculate sl(N)-homology
4+
Khoca is computer program written by Lukas Lewark to calculate sl(N)-homology
55
of knots and links. It calculates the following:
66
77
* Khovanov sl(2)-homology of arbitrary links, given as a braid or in PD code.

src/sage/modules/free_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3175,7 +3175,7 @@ def pseudohom(self, f, twist, codomain=None, side="left"):
31753175
31763176
- ``twist`` -- the twisting morphism or the twisting derivation
31773177
(if a derivation is given, the corresponding morphism `\theta`
3178-
is automatically infered;
3178+
is automatically inferred;
31793179
see also :class:`sage.rings.polynomial.ore_polynomial_ring.OrePolynomialRing`)
31803180
31813181
- ``codomain`` -- (default: ``None``) the codomain of the pseudo

src/sage/rings/function_field/function_field_test.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ def T(F):
7373
# https://github.com/pytest-dev/pytest/issues/349
7474
#
7575
pairs = [("J", None),
76-
("K", 16),
77-
("L", 2),
78-
("M", 1),
79-
("N", 1),
80-
("O", None),
81-
("T", None),
82-
("S", 8)]
76+
("K", 16),
77+
("L", 2),
78+
("M", 1),
79+
("N", 1),
80+
("O", None),
81+
("T", None),
82+
("S", 8)]
8383

8484

8585
@pytest.mark.parametrize("ff,max_runs", pairs)
@@ -95,7 +95,7 @@ def test_function_field_testsuite(ff, max_runs, request) -> None:
9595
The inputs are essentially all fixtures.
9696
9797
- ``ff`` -- string; a function field fixture name
98-
- ``max_runs`` -- integer; the maxmimum number of times to
98+
- ``max_runs`` -- integer; the maximum number of times to
9999
repeat the test suite
100100
- ``request`` -- fixture; a pytest built-in
101101

src/sage/rings/polynomial/polydict.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ cdef class PolyDict:
9898
Data structure for multivariate polynomials.
9999
100100
A PolyDict holds a dictionary all of whose keys are :class:`ETuple` and
101-
whose values are coefficients on which it is implicitely assumed that
101+
whose values are coefficients on which it is implicitly assumed that
102102
arithmetic operations can be performed.
103103
104104
No arithmetic operation on :class:`PolyDict` clear zero coefficients as of

src/sage/rings/polynomial/polynomial_element.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2260,7 +2260,7 @@ cdef class Polynomial(CommutativePolynomial):
22602260
else:
22612261
# Compute the trace of T with field of order 2^k
22622262
# sum T^(2^i) for i in range (degree * k)
2263-
# We use repeated squaring to avoid redundent multiplications
2263+
# We use repeated squaring to avoid redundant multiplications
22642264
C, TT = T, T
22652265
for _ in range(degree * self.base_ring().degree() - 1):
22662266
TT = TT * TT % self

0 commit comments

Comments
 (0)