Skip to content

Commit ea2c228

Browse files
author
Release Manager
committed
gh-35007: Fix some cannot Fix #34944 URL: #35007 Reported by: Frédéric Chapoton Reviewer(s): Matthias Köppe
2 parents 0f0a0d4 + 504c6e8 commit ea2c228

28 files changed

+77
-74
lines changed

src/sage/combinat/alternating_sign_matrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ def _element_constructor_(self, asm, check=True):
11971197
if isinstance(asm, AlternatingSignMatrix):
11981198
if asm.parent() is self:
11991199
return asm
1200-
raise ValueError("Cannot convert between alternating sign matrices of different sizes")
1200+
raise ValueError("cannot convert between alternating sign matrices of different sizes")
12011201
try:
12021202
m = self._matrix_space(asm)
12031203
except (TypeError, ValueError):

src/sage/combinat/decorated_permutation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def _element_constructor_(self, pi, check=True):
213213
if isinstance(pi, DecoratedPermutation):
214214
if pi.parent() is self:
215215
return pi
216-
raise ValueError("Cannot convert between decorated permutations of different sizes")
216+
raise ValueError("cannot convert between decorated permutations of different sizes")
217217

218218
pi = tuple(pi)
219219
if check and pi not in self:

src/sage/combinat/derangements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def _element_constructor_(self, der):
199199
if isinstance(der, Derangement):
200200
if der.parent() is self:
201201
return der
202-
raise ValueError("Cannot convert %s to an element of %s" % (der, self))
202+
raise ValueError("cannot convert %s to an element of %s" % (der, self))
203203
return self.element_class(self, der)
204204

205205
Element = Derangement

src/sage/data_structures/bounded_integer_sequences.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ cdef class BoundedIntegerSequence:
12121212
sage: T+None
12131213
Traceback (most recent call last):
12141214
...
1215-
TypeError: Cannot concatenate bounded integer sequence and None
1215+
TypeError: cannot concatenate bounded integer sequence and None
12161216
12171217
TESTS:
12181218
@@ -1228,7 +1228,7 @@ cdef class BoundedIntegerSequence:
12281228
"""
12291229
cdef BoundedIntegerSequence myself, right, out
12301230
if other is None or self is None:
1231-
raise TypeError('Cannot concatenate bounded integer sequence and None')
1231+
raise TypeError('cannot concatenate bounded integer sequence and None')
12321232
myself = self # may result in a type error
12331233
right = other # --"--
12341234
if right.data.itembitsize != myself.data.itembitsize:

src/sage/geometry/lattice_polytope.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5251,8 +5251,8 @@ def from_palp_index(i):
52515251
elif o in range(65, 91):
52525252
i = o - 28
52535253
else:
5254-
raise ValueError('Cannot convert PALP index '
5255-
+ i + ' to number.')
5254+
raise ValueError('cannot convert PALP index '
5255+
+ i + ' to number')
52565256
return i
52575257
n = len(permutation)
52585258
domain = [from_palp_index(i) for i in permutation]
@@ -5261,6 +5261,7 @@ def from_palp_index(i):
52615261
S = SymmetricGroup(n)
52625262
return make_permgroup_element(S, domain)
52635263

5264+
52645265
def _read_nef_x_partitions(data):
52655266
r"""
52665267
Read all nef-partitions for one polytope from a string or an open

src/sage/geometry/polyhedron/parent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ def convert_base_ring_Hrep(lstlst):
697697
return self._element_constructor_polyhedron(polyhedron, mutable=mutable, **kwds)
698698
if nargs == 1 and args[0] == 0:
699699
return self.zero()
700-
raise ValueError('Cannot convert to polyhedron object.')
700+
raise ValueError('cannot convert to polyhedron object')
701701

702702
def _element_constructor_polyhedron(self, polyhedron, **kwds):
703703
"""

src/sage/libs/giac/giac.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,7 +1408,7 @@ cdef class Pygen(GiacMethods_base):
14081408
return result
14091409
14101410
else:
1411-
raise TypeError("Cannot convert non giac integers to Integer")
1411+
raise TypeError("cannot convert non giac integers to Integer")
14121412
14131413
14141414
def _rational_(self,Z=None):
@@ -1433,7 +1433,7 @@ cdef class Pygen(GiacMethods_base):
14331433
# giac _RAT_
14341434
return ZZ(self.numer()) / ZZ(self.denom())
14351435
else:
1436-
raise TypeError("Cannot convert non giac _FRAC_ to QQ")
1436+
raise TypeError("cannot convert non giac _FRAC_ to QQ")
14371437
14381438
14391439
def sage(self):
@@ -1735,7 +1735,7 @@ cdef class Pygen(GiacMethods_base):
17351735
sig_off()
17361736
return result
17371737
else:
1738-
raise TypeError("Cannot convert non _INT_ giac gen")
1738+
raise TypeError("cannot convert non _INT_ giac gen")
17391739
17401740
17411741
property _double: # immediate double (type _DOUBLE_)
@@ -1749,7 +1749,7 @@ cdef class Pygen(GiacMethods_base):
17491749
sig_off()
17501750
return result
17511751
else:
1752-
raise TypeError("Cannot convert non _DOUBLE_ giac gen")
1752+
raise TypeError("cannot convert non _DOUBLE_ giac gen")
17531753
17541754
property help:
17551755
def __get__(self):

src/sage/libs/pari/convert_sage.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ cpdef set_integer_from_gen(Integer self, Gen x):
352352
break
353353
elif paritype == t_PADIC:
354354
if x._valp() < 0:
355-
raise TypeError("Cannot convert p-adic with negative valuation to an integer")
355+
raise TypeError("cannot convert p-adic with negative valuation to an integer")
356356
# Lifting a PADIC yields an integer
357357
x = x.lift()
358358
break

src/sage/libs/singular/function.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ cdef class SingularFunction(SageObject):
13041304
dummy_ring = PolynomialRing(QQ, "dummy", implementation="singular") # seems a reasonable default
13051305
ring = dummy_ring
13061306
if not (isinstance(ring, MPolynomialRing_libsingular) or isinstance(ring, NCPolynomialRing_plural)):
1307-
raise TypeError("Cannot call Singular function '%s' with ring parameter of type '%s'"%(self._name,type(ring)))
1307+
raise TypeError("cannot call Singular function '%s' with ring parameter of type '%s'" % (self._name,type(ring)))
13081308
return call_function(self, args, ring, interruptible, attributes)
13091309

13101310
def _instancedoc_(self):

src/sage/modules/vector_rational_dense.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ cdef class Vector_rational_dense(free_module_element.FreeModuleElement):
326326
mpq_set_z(a.value, (<Integer>left).value)
327327
else:
328328
# should not happen
329-
raise TypeError("Cannot convert %s to %s" % (type(left).__name__, Rational.__name__))
329+
raise TypeError("cannot convert %s to %s" % (type(left).__name__, Rational.__name__))
330330
z = self._new_c()
331331
cdef Py_ssize_t i
332332
for i in range(self._degree):
@@ -343,7 +343,7 @@ cdef class Vector_rational_dense(free_module_element.FreeModuleElement):
343343
mpq_set_z(a.value, (<Integer>right).value)
344344
else:
345345
# should not happen
346-
raise TypeError("Cannot convert %s to %s" % (type(right).__name__, Rational.__name__))
346+
raise TypeError("cannot convert %s to %s" % (type(right).__name__, Rational.__name__))
347347
z = self._new_c()
348348
cdef Py_ssize_t i
349349
for i in range(self._degree):

0 commit comments

Comments
 (0)