Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit 1e9086c

Browse files
committed
adjust error messages in quivers/
1 parent 1e8ba0a commit 1e9086c

File tree

7 files changed

+65
-95
lines changed

7 files changed

+65
-95
lines changed

src/sage/quivers/algebra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class PathAlgebra(CombinatorialFreeModule):
108108
sage: x.degree()
109109
Traceback (most recent call last):
110110
...
111-
ValueError: Element is not homogeneous.
111+
ValueError: element is not homogeneous
112112
sage: y.is_homogeneous()
113113
True
114114
sage: y.degree()

src/sage/quivers/algebra_elements.pxi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ cdef path_term_t *term_mul_term(path_term_t *T1, path_term_t *T2) except NULL:
578578
cdef mp_size_t new_s_len
579579
if T1.mon.pos!=-1:
580580
if T2.mon.pos!=-1:
581-
raise ValueError("We cannot multiply two module elements")
581+
raise ValueError("we cannot multiply two module elements")
582582
new_l_len = T1.mon.l_len
583583
new_pos = T1.mon.pos
584584
new_s_len = T1.mon.s_len
@@ -798,7 +798,7 @@ cdef bint poly_iadd_term_d(path_poly_t *P, path_term_t *T, path_order_t cmp_term
798798
P.lead = term_free(tmp)
799799
elif <object>(tmp.coef)==0:
800800
sig_off()
801-
raise RuntimeError("This should never happen")
801+
raise RuntimeError("this should never happen")
802802
sig_off()
803803
return True
804804
while True:
@@ -825,7 +825,7 @@ cdef bint poly_iadd_term_d(path_poly_t *P, path_term_t *T, path_order_t cmp_term
825825
P.nterms -= 1
826826
tmp.nxt = term_free(tmp.nxt)
827827
elif <object>(tmp.coef)==0:
828-
raise RuntimeError("This should never happen")
828+
raise RuntimeError("this should never happen")
829829
return True
830830
# otherwise, tmp is still larger than T. Hence, move to the next term
831831
# of P.
@@ -1218,7 +1218,7 @@ cdef path_homog_poly_t *homog_poly_copy(path_homog_poly_t *H) except NULL:
12181218
cdef path_homog_poly_t *out
12191219
cdef path_homog_poly_t *tmp
12201220
if H == NULL:
1221-
raise ValueError("The polynomial to be copied is the NULL pointer")
1221+
raise ValueError("the polynomial to be copied is the NULL pointer")
12221222
out = homog_poly_create(H.start, H.end)
12231223
poly_icopy(out.poly, H.poly)
12241224
tmp = out
@@ -1261,7 +1261,7 @@ cdef path_homog_poly_t *homog_poly_neg(path_homog_poly_t *H) except NULL:
12611261
cdef path_homog_poly_t *out
12621262
cdef path_homog_poly_t *tmp
12631263
if H == NULL:
1264-
raise ValueError("The polynomial to be copied is the NULL pointer")
1264+
raise ValueError("the polynomial to be copied is the NULL pointer")
12651265
out = homog_poly_create(H.start, H.end)
12661266
poly_icopy_neg(out.poly, H.poly)
12671267
tmp = out
@@ -1280,7 +1280,7 @@ cdef path_homog_poly_t *homog_poly_scale(path_homog_poly_t *H, object coef) exce
12801280
cdef path_homog_poly_t *out
12811281
cdef path_homog_poly_t *tmp
12821282
if H == NULL:
1283-
raise ValueError("The polynomial to be copied is the NULL pointer")
1283+
raise ValueError("the polynomial to be copied is the NULL pointer")
12841284
out = homog_poly_create(H.start, H.end)
12851285
poly_icopy_scale(out.poly, H.poly, coef)
12861286
tmp = out

0 commit comments

Comments
 (0)