Skip to content

Commit 0d0447c

Browse files
author
Release Manager
committed
gh-36424: adding some links for Errors in the doc This is adding a few more links to python standard doc for named errors in our doc. ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. URL: #36424 Reported by: Frédéric Chapoton Reviewer(s): Kwankyu Lee
2 parents 45019c3 + 96bcf64 commit 0d0447c

31 files changed

+52
-46
lines changed

src/sage/combinat/binary_recurrence_sequences.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ def pthpowers(self, p, Bound):
539539
[1]
540540
541541
If the sequence is degenerate, and there are no ``p`` th powers, returns `[]`. Otherwise, if
542-
there are many ``p`` th powers, raises ``ValueError``.
542+
there are many ``p`` th powers, raises :class:`ValueError`.
543543
544544
::
545545

src/sage/combinat/cartesian_product.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def __len__(self):
190190
191191
An ``int``, the number of elements in the Cartesian product. If the
192192
number of elements is infinite or does not fit into a python ``int``, a
193-
``TypeError`` is raised.
193+
:class:`TypeError` is raised.
194194
195195
.. SEEALSO::
196196

src/sage/combinat/dyck_word.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def replace_parens(x):
124124
- If ``x`` is a closing parenthesis, replace ``x`` with the
125125
constant ``close_symbol``.
126126
127-
- Raise a ``ValueError`` if ``x`` is neither an opening nor a
127+
- Raise a :class:`ValueError` if ``x`` is neither an opening nor a
128128
closing parenthesis.
129129
130130
.. SEEALSO:: :func:`replace_symbols`
@@ -168,7 +168,7 @@ def replace_symbols(x):
168168
- If ``x`` is ``close_symbol``, replace ``x`` with ``')'``.
169169
170170
- If ``x`` is neither ``open_symbol`` nor ``close_symbol``, a
171-
``ValueError`` is raised.
171+
:class:`ValueError` is raised.
172172
173173
.. SEEALSO:: :func:`replace_parens`
174174

src/sage/combinat/free_module.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,8 @@ def _element_constructor_(self, x):
699699
700700
The following originally used to yield ``p[[2]] # p[[2]]``, and if
701701
there was no natural coercion between ``s`` and ``p``, this would
702-
raise a ``NotImplementedError``. Since :trac:`15305`, this takes the
702+
raise a :class:`NotImplementedError`.
703+
Since :trac:`15305`, this takes the
703704
coercion between ``s`` and ``p`` and lifts it to the tensor product. ::
704705
705706
sage: pp(a) # optional - sage.combinat

src/sage/combinat/fully_commutative_elements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ class FullyCommutativeElements(UniqueRepresentation, Parent):
800800
True
801801
802802
Attempting to create an element from an input that is not the reduced word
803-
of a fully commutative element throws a ``ValueError``::
803+
of a fully commutative element throws a :class:`ValueError`::
804804
805805
sage: FC([1,2,1])
806806
Traceback (most recent call last):

src/sage/combinat/integer_lists/invlex.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ If you know what you are doing, you can set check=False to skip this warning."""
862862
863863
``None`` if this method finds a proof that there
864864
exists an upper bound on the length. Otherwise a
865-
``ValueError`` is raised.
865+
:class:`ValueError` is raised.
866866
867867
EXAMPLES::
868868

src/sage/combinat/nu_dyck_word.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def replace_dyck_char(x):
9494
- If ``x`` is a closing character, replace ``x`` with the
9595
constant ``ndw_close_symbol``.
9696
97-
- Raise a ``ValueError`` if ``x`` is neither an opening nor a
97+
- Raise a :class:`ValueError` if ``x`` is neither an opening nor a
9898
closing character.
9999
100100
.. SEEALSO:: :func:`replace_dyck_symbol`
@@ -142,7 +142,7 @@ def replace_dyck_symbol(x, open_char='N', close_char='E') -> str:
142142
- If ``x`` is ``ndw_close_symbol``, replace ``x`` with ``close_char``.
143143
144144
- If ``x`` is neither ``ndw_open_symbol`` nor ``ndw_close_symbol``, a
145-
``ValueError`` is raised.
145+
:class:`ValueError` is raised.
146146
147147
.. SEEALSO:: :func:`replace_dyck_char`
148148

src/sage/combinat/perfect_matching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def __classcall_private__(cls, parts):
130130
The function checks that the given list or permutation is
131131
a valid perfect matching (i.e. a list of pairs with pairwise
132132
disjoint elements or a fix point free involution) and raises
133-
a ``ValueError`` otherwise::
133+
a :class:`ValueError` otherwise::
134134
135135
sage: PerfectMatching([(1, 2, 3), (4, 5)])
136136
Traceback (most recent call last):

src/sage/combinat/ranker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def rank_from_list(l):
7272
sage: r('c')
7373
2
7474
75-
For non elements a ``ValueError`` is raised, as with the usual
75+
For non elements a :class:`ValueError` is raised, as with the usual
7676
``index`` method of lists::
7777
7878
sage: r('blah')

src/sage/combinat/root_system/associahedron.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ class Associahedra_base():
337337
338338
Importantly, the parent knows the dimension of the ambient
339339
space. If you try to construct an associahedron of a different
340-
dimension, a ``ValueError`` is raised::
340+
dimension, a :class:`ValueError` is raised::
341341
342342
sage: parent(['A',3])
343343
Traceback (most recent call last):

0 commit comments

Comments
 (0)