Skip to content

Commit 3723f2d

Browse files
committed
changing some Cannot to cannot in error messages
1 parent 047281e commit 3723f2d

33 files changed

+78
-77
lines changed

src/sage/combinat/alternating_sign_matrix.py

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

src/sage/combinat/decorated_permutation.py

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

217217
pi = tuple(pi)
218218
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
@@ -198,7 +198,7 @@ def _element_constructor_(self, der):
198198
if isinstance(der, Derangement):
199199
if der.parent() is self:
200200
return der
201-
raise ValueError("Cannot convert %s to an element of %s" % (der, self))
201+
raise ValueError("cannot convert %s to an element of %s" % (der, self))
202202
return self.element_class(self, der)
203203

204204
Element = Derangement

src/sage/combinat/posets/posets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1603,7 +1603,7 @@ def linear_extensions(self, facade=False):
16031603
sage: L([1, 2, 3, 4, 6, 12])
16041604
Traceback (most recent call last):
16051605
...
1606-
TypeError: Cannot convert list to sage.structure.element.Element
1606+
TypeError: cannot convert list to sage.structure.element.Element
16071607
16081608
EXAMPLES::
16091609

src/sage/cpython/wrapperdescr.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ cdef inline wrapperbase* get_slotdef(wrapper_descriptor slotwrapper) except NULL
5959
sage: py_get_slotdef(X.__eq__)
6060
Traceback (most recent call last):
6161
...
62-
TypeError: Cannot convert ... to wrapper_descriptor
62+
TypeError: cannot convert ... to wrapper_descriptor
6363
"""
6464
return slotwrapper.d_base

src/sage/data_structures/bounded_integer_sequences.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,11 +1208,11 @@ cdef class BoundedIntegerSequence:
12081208
sage: T+list(S)
12091209
Traceback (most recent call last):
12101210
...
1211-
TypeError: Cannot convert list to sage.data_structures.bounded_integer_sequences.BoundedIntegerSequence
1211+
TypeError: cannot convert list to sage.data_structures.bounded_integer_sequences.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/graphs/generic_graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2414,7 +2414,7 @@ def weighted_adjacency_matrix(self, sparse=True, vertices=None,
24142414
sage: G.weighted_adjacency_matrix()
24152415
Traceback (most recent call last):
24162416
...
2417-
TypeError: Cannot convert NoneType to sage.structure.parent.Parent
2417+
TypeError: cannot convert NoneType to sage.structure.parent.Parent
24182418
"""
24192419
if self.has_multiple_edges():
24202420
raise NotImplementedError("don't know how to represent weights for a multigraph")

src/sage/libs/giac/giac.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ cdef class Pygen(GiacMethods_base):
14091409
return result
14101410
14111411
else:
1412-
raise TypeError("Cannot convert non giac integers to Integer")
1412+
raise TypeError("cannot convert non giac integers to Integer")
14131413
14141414
14151415
def _rational_(self,Z=None):
@@ -1434,7 +1434,7 @@ cdef class Pygen(GiacMethods_base):
14341434
# giac _RAT_
14351435
return ZZ(self.numer()) / ZZ(self.denom())
14361436
else:
1437-
raise TypeError("Cannot convert non giac _FRAC_ to QQ")
1437+
raise TypeError("cannot convert non giac _FRAC_ to QQ")
14381438
14391439
14401440
def sage(self):
@@ -1736,7 +1736,7 @@ cdef class Pygen(GiacMethods_base):
17361736
sig_off()
17371737
return result
17381738
else:
1739-
raise TypeError("Cannot convert non _INT_ giac gen")
1739+
raise TypeError("cannot convert non _INT_ giac gen")
17401740
17411741
17421742
property _double: # immediate double (type _DOUBLE_)
@@ -1750,7 +1750,7 @@ cdef class Pygen(GiacMethods_base):
17501750
sig_off()
17511751
return result
17521752
else:
1753-
raise TypeError("Cannot convert non _DOUBLE_ giac gen")
1753+
raise TypeError("cannot convert non _DOUBLE_ giac gen")
17541754
17551755
property help:
17561756
def __get__(self):

0 commit comments

Comments
 (0)