Skip to content

Commit 56533be

Browse files
author
Release Manager
committed
gh-36362: a few more links to errors in the doc This adds a few more links from Errors to standard python documentation. ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. We're here to help! --> URL: #36362 Reported by: Frédéric Chapoton Reviewer(s): David Coudert, Frédéric Chapoton
2 parents e33c041 + de726e5 commit 56533be

24 files changed

+86
-73
lines changed

src/sage/categories/sets_with_partial_maps.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
from sage.categories.category_singleton import Category_singleton
1414
from .objects import Objects
1515

16+
1617
class SetsWithPartialMaps(Category_singleton):
1718
"""
1819
The category whose objects are sets and whose morphisms are
19-
maps that are allowed to raise a ValueError on some inputs.
20+
maps that are allowed to raise a :class:`ValueError` on some inputs.
2021
2122
This category is equivalent to the category of pointed sets,
2223
via the equivalence sending an object X to X union {error},

src/sage/graphs/generic_graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23180,9 +23180,9 @@ def automorphism_group(self, partition=None, verbosity=0,
2318023180

2318123181
TESTS:
2318223182

23183-
We get a KeyError when given an invalid partition (:trac:`6087`)::
23183+
We get a :class:`KeyError` when given an invalid partition (:trac:`6087`)::
2318423184

23185-
sage: g=graphs.CubeGraph(3)
23185+
sage: g = graphs.CubeGraph(3)
2318623186
sage: g.relabel()
2318723187
sage: g.automorphism_group(partition=[[0,1,2],[3,4,5]],algorithm='sage') # needs sage.groups
2318823188
Traceback (most recent call last):

src/sage/interfaces/axiom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
clisp.
4444
4545
If the string "error" (case insensitive) occurs in the output of
46-
anything from axiom, a RuntimeError exception is raised.
46+
anything from axiom, a :class:`RuntimeError` exception is raised.
4747
4848
EXAMPLES: We evaluate a very simple expression in axiom.
4949

src/sage/interfaces/gap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def load_package(self, pkg, verbose=False):
430430
"""
431431
Load the Gap package with the given name.
432432
433-
If loading fails, raise a RuntimeError exception.
433+
If loading fails, raise a :class:`RuntimeError` exception.
434434
435435
TESTS::
436436

src/sage/interfaces/giac.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
4949
5050
If the string "error" (case insensitive) occurs in the output of
51-
anything from Giac, a RuntimeError exception is raised.
51+
anything from Giac, a :class:`RuntimeError` exception is raised.
5252
5353
Tutorial
5454
--------

src/sage/interfaces/maple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
(x-y)*(x^4+x^3*y+x^2*y^2+x*y^3+y^4)
3737
3838
If the string "error" (case insensitive) occurs in the output of
39-
anything from Maple, a RuntimeError exception is raised.
39+
anything from Maple, a :class:`RuntimeError` exception is raised.
4040
4141
Tutorial
4242
--------

src/sage/interfaces/maxima.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<class 'sage.interfaces.maxima.Maxima'>
3636
3737
If the string "error" (case insensitive) occurs in the output of
38-
anything from Maxima, a RuntimeError exception is raised.
38+
anything from Maxima, a :class:`RuntimeError` exception is raised.
3939
4040
EXAMPLES: We evaluate a very simple expression in Maxima.
4141

src/sage/interfaces/mwrank.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def eval(self, s, **kwds):
294294
295295
.. NOTE::
296296
297-
If a RuntimeError exception is raised, then the mwrank
297+
If a :class:`RuntimeError` exception is raised, then the mwrank
298298
interface is restarted and the command is retried once.
299299
300300
EXAMPLES::

src/sage/libs/gap/libgap.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ class Gap(Parent):
412412

413413
def load_package(self, pkg):
414414
"""
415-
If loading fails, raise a RuntimeError exception.
415+
If loading fails, raise a :class:`RuntimeError` exception.
416416
417417
TESTS::
418418

src/sage/matrix/matrix0.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ cdef class Matrix(sage.structure.element.Matrix):
393393
"""
394394
This function gets called when you're about to change this matrix.
395395
396-
If self is immutable, a ValueError is raised, since you should
396+
If self is immutable, a :class:`ValueError` is raised, since you should
397397
never change a mutable matrix.
398398
399399
If self is mutable, the cache of results about self is deleted.
@@ -406,10 +406,10 @@ cdef class Matrix(sage.structure.element.Matrix):
406406
cdef check_bounds_and_mutability(self, Py_ssize_t i, Py_ssize_t j):
407407
"""
408408
This function gets called when you're about to set the i,j entry of
409-
this matrix. If i or j is out of range, an IndexError exception is
410-
raised.
409+
this matrix. If i or j is out of range, an :class:`IndexError`
410+
exception is raised.
411411
412-
If self is immutable, a ValueError is raised, since you should
412+
If self is immutable, a :class:`ValueError` is raised, since you should
413413
never change a mutable matrix.
414414
415415
If self is mutable, the cache of results about self is deleted.

0 commit comments

Comments
 (0)