Skip to content

Commit 3d9dc8d

Browse files
author
Release Manager
committed
gh-36855: some ruff details in modular (unicode) remove the utf8 encoding declarations also wrap some errors codes in the doc ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. URL: #36855 Reported by: Frédéric Chapoton Reviewer(s): Matthias Köppe
2 parents c4bebb1 + 7cbc82a commit 3d9dc8d

File tree

13 files changed

+17
-23
lines changed

13 files changed

+17
-23
lines changed

src/sage/modular/cusps.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
r"""
32
The set `\mathbb{P}^1(\QQ)` of cusps
43

src/sage/modular/etaproducts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ def EtaProduct(level, dic) -> EtaGroupElement:
633633
- ``dic`` -- (dictionary): a dictionary indexed by
634634
divisors of N such that the coefficient of `\eta(q^d)` is
635635
r[d]. Only nonzero coefficients need be specified. If Ligozat's
636-
criteria are not satisfied, a ``ValueError`` will be raised.
636+
criteria are not satisfied, a :class:`ValueError` will be raised.
637637
638638
OUTPUT:
639639

src/sage/modular/hypergeometric_motive.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Hypergeometric motives
43
@@ -261,7 +260,7 @@ def alpha_to_cyclotomic(alpha):
261260
262261
The output represent a product of cyclotomic polynomials with exactly
263262
the given roots. Note that the multiplicity of `r/s` in the list
264-
must be independent of `r`; otherwise, a ``ValueError`` will be raised.
263+
must be independent of `r`; otherwise, a :class:`ValueError` will be raised.
265264
266265
This is the inverse of :func:`cyclotomic_to_alpha`.
267266

src/sage/modular/local_comp/smoothchar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ def extend_character(self, level, chi, vals, check=True):
13141314
ring coercible to it), specifying values on the quotients returned by
13151315
:meth:`quotient_gens`.
13161316
1317-
A ``ValueError`` will be raised if `x^t \ne \chi(\alpha^t)`, where `t`
1317+
A :class:`ValueError` will be raised if `x^t \ne \chi(\alpha^t)`, where `t`
13181318
is the smallest integer such that `\alpha^t` is congruent modulo
13191319
`p^{\rm level}` to an element of `\QQ_p`.
13201320

src/sage/modular/modform/element.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ def atkin_lehner_eigenvalue(self, d=None, embedding=None):
658658
specified, and in (a suitable extension of) the base field of
659659
``self`` otherwise.
660660
661-
If ``self`` is not an eigenform for `W_d`, a ``ValueError`` is
661+
If ``self`` is not an eigenform for `W_d`, a :class:`ValueError` is
662662
raised.
663663
664664
.. SEEALSO::
@@ -2588,7 +2588,7 @@ def atkin_lehner_eigenvalue(self, d=None, embedding=None):
25882588
OUTPUT:
25892589
25902590
The Atkin-Lehner eigenvalue of `W_d` on ``self``. If ``self`` is not an
2591-
eigenform for `W_d`, a ``ValueError`` is raised.
2591+
eigenform for `W_d`, a :class:`ValueError` is raised.
25922592
25932593
.. SEEALSO::
25942594

src/sage/modular/modform_hecketriangle/abstract_space.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ def element_from_ambient_coordinates(self, vec):
620620
def homogeneous_part(self, k, ep):
621621
r"""
622622
Since ``self`` already is a homogeneous component return ``self``
623-
unless the degree differs in which case a ``ValueError`` is raised.
623+
unless the degree differs in which case a :class:`ValueError` is raised.
624624
625625
EXAMPLES::
626626

src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def _word_S_T_data(self):
183183
of ``self`` as a product of the generators ``S`` and ``T``
184184
together with a sign correction ``sgn``.
185185
186-
If this decomposition is not possible a ``TypeError``
186+
If this decomposition is not possible a :class:`TypeError`
187187
is raised. In particular this function can be used to
188188
check the membership in ``parent`` of an arbitrary matrix
189189
over the base ring.
@@ -257,7 +257,7 @@ def word_S_T(self):
257257
of ``L`` are either the generator ``S`` or a non-trivial
258258
integer power of the generator ``T``. ``sgn`` is +- the identity.
259259
260-
If this decomposition is not possible a ``TypeError`` is raised.
260+
If this decomposition is not possible a :class:`TypeError` is raised.
261261
262262
EXAMPLES::
263263

src/sage/modular/modform_hecketriangle/hecke_triangle_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ def root_extension_embedding(self, D, K=None):
757757
OUTPUT:
758758
759759
The corresponding embedding if it was found.
760-
Otherwise a ``ValueError`` is raised.
760+
Otherwise a :class:`ValueError` is raised.
761761
762762
EXAMPLES::
763763

src/sage/modular/modsym/manin_symbol_list.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Manin symbol lists
43

src/sage/modular/pollack_stevens/dist.pyx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def get_dist_classes(p, prec_cap, base, symk, implementation):
6767
6868
- ``implementation`` - string - If not None, override the
6969
automatic choice of implementation. May be 'long' or 'vector',
70-
otherwise raise a ``NotImplementedError``
70+
otherwise raise a :class:`NotImplementedError`
7171
7272
OUTPUT:
7373
@@ -293,9 +293,9 @@ cdef class Dist(ModuleElement):
293293
def find_scalar(self, _other, p, M=None, check=True):
294294
r"""
295295
Return an ``alpha`` with ``other = self * alpha``, or raises
296-
a ``ValueError``.
296+
a :class:`ValueError`.
297297
298-
It will also raise a ``ValueError`` if this distribution is zero.
298+
It will also raise a :class:`ValueError` if this distribution is zero.
299299
300300
INPUT:
301301
@@ -417,9 +417,9 @@ cdef class Dist(ModuleElement):
417417
def find_scalar_from_zeroth_moment(self, _other, p, M=None, check=True):
418418
r"""
419419
Return an ``alpha`` with ``other = self * alpha`` using only
420-
the zeroth moment, or raises a ``ValueError``.
420+
the zeroth moment, or raises a :class:`ValueError`.
421421
422-
It will also raise a ``ValueError`` if the zeroth moment of the
422+
It will also raise a :class:`ValueError` if the zeroth moment of the
423423
distribution is zero.
424424
425425
INPUT:

0 commit comments

Comments
 (0)