Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/sage/rings: Fix some errors shown by tox -e rst
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Jul 12, 2022
1 parent a2f5ef6 commit c2d0a91
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 21 deletions.
16 changes: 8 additions & 8 deletions src/sage/rings/asymptotic/term_monoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,7 @@ def _validate_growth_or_error_(self, kwds_construction):
- ``kwds_construction`` -- a dictionary representing
the keyword arguments of a term in its construction
(see also :meth:`GenericTerm.construction` and
:meth:`TermWithCoefficient.construction`)
:meth:`TermWithCoefficient.construction`)
OUTPUT:
Expand Down Expand Up @@ -1976,7 +1976,7 @@ def _validate_coefficient_or_error_(self, kwds_construction):
- ``kwds_construction`` -- a dictionary representing
the keyword arguments of a term in its construction
(see also :meth:`GenericTerm.construction` and
:meth:`TermWithCoefficient.construction`)
:meth:`TermWithCoefficient.construction`)
OUTPUT:
Expand Down Expand Up @@ -2068,7 +2068,7 @@ def _convert_construction_(self, kwds_construction):
- ``kwds_construction`` -- a dictionary representing
the keyword arguments of a term in its construction
(see also :meth:`GenericTerm.construction` and
:meth:`TermWithCoefficient.construction`)
:meth:`TermWithCoefficient.construction`)
OUTPUT:
Expand Down Expand Up @@ -2991,7 +2991,7 @@ def _convert_construction_(self, kwds_construction):
- ``kwds_construction`` -- a dictionary representing
the keyword arguments of a term in its construction
(see also :meth:`GenericTerm.construction` and
:meth:`TermWithCoefficient.construction`)
:meth:`TermWithCoefficient.construction`)
OUTPUT:
Expand Down Expand Up @@ -3588,7 +3588,7 @@ def _validate_coefficient_or_error_(self, kwds_construction):
- ``kwds_construction`` -- a dictionary representing
the keyword arguments of a term in its construction
(see also :meth:`GenericTerm.construction` and
:meth:`TermWithCoefficient.construction`)
:meth:`TermWithCoefficient.construction`)
OUTPUT:
Expand Down Expand Up @@ -3676,7 +3676,7 @@ def _convert_construction_(self, kwds_construction):
- ``kwds_construction`` -- a dictionary representing
the keyword arguments of a term in its construction
(see also :meth:`GenericTerm.construction` and
:meth:`TermWithCoefficient.construction`)
:meth:`TermWithCoefficient.construction`)
OUTPUT:
Expand Down Expand Up @@ -4453,7 +4453,7 @@ def _convert_construction_(self, kwds_construction):
- ``kwds_construction`` -- a dictionary representing
the keyword arguments of a term in its construction
(see also :meth:`GenericTerm.construction` and
:meth:`TermWithCoefficient.construction`)
:meth:`TermWithCoefficient.construction`)
OUTPUT:
Expand Down Expand Up @@ -4995,7 +4995,7 @@ def _convert_construction_(self, kwds_construction):
- ``kwds_construction`` -- a dictionary representing
the keyword arguments of a term in its construction
(see also :meth:`GenericTerm.construction` and
:meth:`TermWithCoefficient.construction`)
:meth:`TermWithCoefficient.construction`)
OUTPUT:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/complex_interval_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- Carl Witty (2007-10-24): rewrite for intervals
- Niles Johnson (2010-08): :Trac:`3893`: ``random_element()``
- Niles Johnson (2010-08): :trac:`3893`: ``random_element()``
should pass on ``*args`` and ``**kwds``.
- Travis Scrimshaw (2012-10-18): Added documentation to get full coverage.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/function_field/place.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ def _residue_field(self, name=None):

def to_V(e):
"""
An example to show the idea: Suppose that
An example to show the idea: Suppose that::
[x 0 0]
M = [0 1 0] and v = (x^10, x^7 + x^3, x^7 + x^4 + x^3 + 1)
Expand Down
6 changes: 3 additions & 3 deletions src/sage/rings/number_field/bdd_height.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,14 +454,14 @@ def rational_in(x, y):

def delta_approximation(x, delta):
r"""
Compute a rational number in range (x-delta, x+delta)
Compute a rational number in range `(x-delta, x+delta)`
"""
return rational_in(x - delta, x + delta)

def vector_delta_approximation(v, delta):
r"""
Compute a rational vector w=(w1, ..., wn)
such that |vi-wi|<delta for all i in [1, n]
Compute a rational vector `w=(w_1, ..., w_n)`
such that `|v_i-w_i|<delta` for all `i` in `[1, n]`
"""
return [delta_approximation(vi, delta) for vi in v]

Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/number_field/number_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -4207,7 +4207,7 @@ def _pari_absolute_structure(self):
- ``beta`` is the image of `x \bmod g` under the inverse
isomorphism `\phi^{-1}\colon K[x]/(g) \to K[x]/(f)`
EXAMPLES::
EXAMPLES:
If `f` is monic and integral, the result satisfies ``g = f``
and ``alpha = beta = x``::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/number_field/number_field_rel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ def _pari_relative_structure(self):
- ``beta`` is the image of `x \bmod g` under the inverse
isomorphism `\phi^{-1}\colon K[x]/(g) \to K[x]/(f)`.
EXAMPLES::
EXAMPLES:
If the defining polynomials are monic and integral, the result
satisfies ``g = f`` and ``alpha = beta = x``::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/rings/number_field/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -1727,7 +1727,7 @@ def _assume_maximal(self, is_maximal=True, p=None):
Record that this order ``is_maximal`` at the integer prime ``p``.
To support the deprecated behavior for
``is_maximal="non-maximal-non-unique"`, this returns an order.
``is_maximal="non-maximal-non-unique"``, this returns an order.
Typically, the order itself.
EXAMPLES::
Expand Down Expand Up @@ -2319,7 +2319,7 @@ def _assume_maximal(self, is_maximal=True, p=None):
Record that this order ``is_maximal`` at the integer prime ``p``.
To support the deprecated behavior for
``is_maximal="non-maximal-non-unique"`, this returns an order.
``is_maximal="non-maximal-non-unique"``, this returns an order.
Typically, the order itself.
EXAMPLES::
Expand Down
5 changes: 4 additions & 1 deletion src/sage/rings/padics/lattice_precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,11 +1306,13 @@ def history(self, compact=True, separate_reduce=False, timings=True, output_type
0.000009s oo~~o~o~ooo~o~ooo~o~
0.014250s oooooooooooo
The legend is the following::
The legend is the following:
- the symbol ``o`` represents a tracked element,
- the symbol ``~`` represents an element which is marked for deletion.
On the history, we see:
- 1st line: twenty new elements were created
(this corresponds to the affectation of the list ``L``);
- 2nd line: elements at prime positions were marked for deletion
Expand Down Expand Up @@ -1489,6 +1491,7 @@ def timings(self, action=None):
a dictionary
Here are the meanings of the keywords above:
- ``add``: time spent in adding new columns to the precision matrix
(corresponding to the creation of new elements)
- ``mark``: time spent in marking elements for deletion
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/polynomial/ore_polynomial_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ def random_element(self, degree=(-1, 2), monic=False, *args, **kwds):
(3*t^2 + 1)*x^4 + (4*t + 2)*x^3 + (4*t + 1)*x^2
+ (t^2 + 3*t + 3)*x + 3*t^2 + 2*t + 2
TESTS::
TESTS:
If the first tuple element is greater than the second, a
``ValueError`` is raised::
Expand Down
6 changes: 4 additions & 2 deletions src/sage/rings/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ def test_random_elements(level=MAX_LEVEL, trials=1):
Create random elements of random rings until a crash occurs, in
which case an exception is raised. Defaults to running a single
trial, but more can be specified. To run tests in an infinite
loop, you could use:
loop, you could use::
while True: test_random_elements(trials=100, print_seed=True)
INPUT:
Expand Down Expand Up @@ -358,7 +359,8 @@ def test_random_arith(level=MAX_LEVEL, trials=1):
Create random elements of random rings and does some arithmetic
with them, until a crash occurs, in which case an exception is
raised. Defaults to running a single trial, but more can be
specified. To run tests in an infinite loop, you could use:
specified. To run tests in an infinite loop, you could use::
while True: test_random_arith(trials=100, print_seed=True)
INPUT:
Expand Down

0 comments on commit c2d0a91

Please sign in to comment.