Skip to content

Commit 20dea3b

Browse files
author
Release Manager
committed
Trac #34169: Fix docstring markup in sage/interacts and sage/rings
Part of #34157: {{{ sage/interacts/library.py:94:1: RST301 Unexpected indentation. sage/rings/quotient_ring.py:17:1: RST303 Unknown directive type "todo". sage/rings/localization.py:5:1: RST201 Block quote ends without a blank line; unexpected unindent. sage/rings/padics/padic_lattice_element.py:621:1: RST218 Literal block expected; none found. sage/rings/padics/padic_lattice_element.py:664:1: RST218 Literal block expected; none found. sage/rings/padics/padic_lattice_element.py:1282:1: RST218 Literal block expected; none found. sage/rings/number_field/number_field_ideal.py:3016:1: RST301 Unexpected indentation. sage/rings/number_field/number_field_ideal.py:3017:1: RST201 Block quote ends without a blank line; unexpected unindent. sage/rings/number_field/number_field_ideal.py:3261:1: RST201 Block quote ends without a blank line; unexpected unindent. sage/rings/number_field/number_field_ideal.py:3326:1: RST201 Block quote ends without a blank line; unexpected unindent. }}} URL: https://trac.sagemath.org/34169 Reported by: klee Ticket author(s): Frédéric Chapoton Reviewer(s): Matthias Koeppe
2 parents c29832b + 4950d2b commit 20dea3b

File tree

5 files changed

+34
-33
lines changed

5 files changed

+34
-33
lines changed

src/sage/interacts/library.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def library_interact(
9191
INPUT:
9292
9393
- ``**widgets`` -- keyword arguments that are passed to the
94-
``interact`` function to create the widgets. Each value must be a callable that
95-
returns a widget.
94+
``interact`` function to create the widgets. Each value must
95+
be a callable that returns a widget.
9696
9797
EXAMPLES::
9898

src/sage/rings/localization.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# -*- coding: utf-8 -*-
21
r"""
32
Localization
43
5-
Localization is an important ring construction tool. Whenever you have to extend a given
6-
integral domain such that it contains the inverses of a finite set of elements but should
7-
allow non injective homomorphic images this construction will be needed. See the example
8-
on Ariki-Koike algebras below for such an application.
4+
Localization is an important ring construction tool. Whenever you have
5+
to extend a given integral domain such that it contains the inverses
6+
of a finite set of elements but should allow non injective homomorphic
7+
images this construction will be needed. See the example on
8+
Ariki-Koike algebras below for such an application.
99
1010
EXAMPLES::
1111
@@ -32,8 +32,8 @@
3232
sage: u = [u0, u1, u2]
3333
sage: S = Set(u)
3434
sage: I = S.cartesian_product(S)
35-
sage: add_units = u + [q, q+1] + [ui -uj for ui, uj in I if ui != uj]\
36-
+ [q*ui -uj for ui, uj in I if ui != uj]
35+
sage: add_units = u + [q, q + 1] + [ui - uj for ui, uj in I if ui != uj]
36+
sage: add_units += [q*ui - uj for ui, uj in I if ui != uj]
3737
sage: L = R.localization(tuple(add_units)); L
3838
Multivariate Polynomial Ring in u0, u1, u2, q over Integer Ring localized at
3939
(q, q + 1, u2, u1, u1 - u2, u0, u0 - u2, u0 - u1, u2*q - u1, u2*q - u0,
@@ -42,12 +42,12 @@
4242
Define the representation matrices (of one of the three dimensional irreducible representations)::
4343
4444
sage: m1 = matrix(L, [[u1, 0, 0],[0, u0, 0],[0, 0, u0]])
45-
sage: m2 = matrix(L, [[(u0*q - u0)/(u0 - u1), (u0*q - u1)/(u0 - u1), 0],\
46-
[(-u1*q + u0)/(u0 - u1), (-u1*q + u1)/(u0 - u1), 0],\
47-
[0, 0, -1]])
48-
sage: m3 = matrix(L, [[-1, 0, 0],\
49-
[0, u0*(1 - q)/(u1*q - u0), q*(u1 - u0)/(u1*q - u0)],\
50-
[0, (u1*q^2 - u0)/(u1*q - u0), (u1*q^ 2 - u1*q)/(u1*q - u0)]])
45+
sage: m2 = matrix(L, [[(u0*q - u0)/(u0 - u1), (u0*q - u1)/(u0 - u1), 0],
46+
....: [(-u1*q + u0)/(u0 - u1), (-u1*q + u1)/(u0 - u1), 0],
47+
....: [0, 0, -1]])
48+
sage: m3 = matrix(L, [[-1, 0, 0],
49+
....: [0, u0*(1 - q)/(u1*q - u0), q*(u1 - u0)/(u1*q - u0)],
50+
....: [0, (u1*q^2 - u0)/(u1*q - u0), (u1*q^ 2 - u1*q)/(u1*q - u0)]])
5151
sage: m1.base_ring() == L
5252
True
5353
@@ -100,7 +100,6 @@
100100
[ 0 4 5]
101101
[ 0 7 6]
102102
103-
104103
Obtain specializations in characteristic 0::
105104
106105
sage: fQ = L.hom((3,5,7,11), codomain=QQ); fQ

src/sage/rings/number_field/number_field_ideal.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3009,13 +3009,15 @@ def _p_quotient(self, p):
30093009
computing the quotient of the ring of integers by a prime ideal.
30103010
30113011
INPUT:
3012-
p -- a prime number contained in self.
3012+
3013+
- ``p`` -- a prime number contained in ``self``
30133014
30143015
OUTPUT:
3015-
V -- a vector space of characteristic p
3016-
quo -- a partially defined quotient homomorphism from the
3017-
ambient number field to V
3018-
lift -- a section of quo.
3016+
3017+
- ``V`` -- a vector space of characteristic ``p``
3018+
- ``quo`` -- a partially defined quotient homomorphism from the
3019+
ambient number field to ``V``
3020+
- ``lift`` -- a section of ``quo``.
30193021
30203022
EXAMPLES::
30213023
@@ -3250,7 +3252,7 @@ def __call__(self, x):
32503252
return self.__Q( list(w) )
32513253

32523254
def __repr__(self):
3253-
"""
3255+
r"""
32543256
Return a string representation of this QuotientMap.
32553257
32563258
EXAMPLES::
@@ -3315,7 +3317,7 @@ def __call__(self, x):
33153317
return self.__OK(sum(z[i] * self.__Kgen ** i for i in range(len(z))))
33163318

33173319
def __repr__(self):
3318-
"""
3320+
r"""
33193321
Return a string representation of this QuotientMap.
33203322
33213323
EXAMPLES::

src/sage/rings/padics/padic_lattice_element.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -617,10 +617,10 @@ def _div_(self, other):
617617
r"""
618618
Return the quotient of this element and ``other``.
619619
620-
NOTE::
620+
.. NOTE::
621621
622-
The result of division always lives in the fraction field,
623-
even if the element to be inverted is a unit.
622+
The result of division always lives in the fraction field,
623+
even if the element to be inverted is a unit.
624624
625625
EXAMPLES::
626626
@@ -660,10 +660,10 @@ def __invert__(self):
660660
r"""
661661
Return the multiplicative inverse of this element.
662662
663-
NOTE::
663+
.. NOTE::
664664
665-
The result of division always lives in the fraction field,
666-
even if the element to be inverted is a unit.
665+
The result of division always lives in the fraction field,
666+
even if the element to be inverted is a unit.
667667
668668
EXAMPLES::
669669
@@ -1278,10 +1278,10 @@ def _is_exact_zero(self):
12781278
r"""
12791279
Return ``True`` if this element is exactly zero.
12801280
1281-
NOTE::
1281+
.. NOTE::
12821282
1283-
Since exact zeros are not supported in the precision lattice
1284-
model, this function always returns ``False``.
1283+
Since exact zeros are not supported in the precision lattice
1284+
model, this function always returns ``False``.
12851285
12861286
EXAMPLES::
12871287

src/sage/rings/quotient_ring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
sage: I = R.ideal([4 + 3*x + x^2, 1 + x^2])
1616
sage: S = R.quotient_ring(I)
1717
18-
.. todo::
18+
.. TODO::
1919
2020
The following skipped tests should be removed once :trac:`13999` is fixed::
2121

0 commit comments

Comments
 (0)