Skip to content

Commit 1272029

Browse files
committed
suggested details
1 parent 6ef8fa1 commit 1272029

File tree

2 files changed

+18
-23
lines changed

2 files changed

+18
-23
lines changed

src/sage/modular/abvar/homspace.py

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -482,13 +482,11 @@ def free_module(self):
482482

483483
def gen(self, i=0):
484484
"""
485-
Return i-th generator of self.
485+
Return i-th generator of ``self``.
486486
487487
INPUT:
488488
489-
490-
- ``i`` - an integer
491-
489+
- ``i`` -- an integer
492490
493491
OUTPUT: a morphism
494492
@@ -508,7 +506,7 @@ def gen(self, i=0):
508506

509507
def ngens(self):
510508
"""
511-
Return number of generators of self.
509+
Return number of generators of ``self``.
512510
513511
OUTPUT: integer
514512
@@ -661,10 +659,12 @@ def _calculate_product_gens(self):
661659

662660
def _calculate_simple_gens(self):
663661
"""
664-
Calculate generators for self, where both the domain and codomain
665-
for self are assumed to be simple abelian varieties. The saturation
666-
of the span of these generators in self will be the full space of
667-
homomorphisms from the domain of self to its codomain.
662+
Calculate generators for ``self``, where both the domain and codomain
663+
for ``self`` are assumed to be simple abelian varieties.
664+
665+
The saturation of the span of these generators in ``self``
666+
will be the full space of homomorphisms from the domain of
667+
``self`` to its codomain.
668668
669669
EXAMPLES::
670670
@@ -759,13 +759,11 @@ def __init__(self, A, gens=None, category=None):
759759
760760
INPUT:
761761
762+
- ``A`` -- an abelian variety
762763
763-
- ``A`` - an abelian variety
764-
765-
- ``gens`` - (default: None); optional; if given
764+
- ``gens`` -- (default: ``None``); optional; if given
766765
should be a tuple of the generators as matrices
767766
768-
769767
EXAMPLES::
770768
771769
sage: J0(23).endomorphism_ring()
@@ -808,12 +806,11 @@ def __init__(self, A, gens=None, category=None):
808806
self._A = A
809807

810808
# Initialise self with the correct category.
811-
# We need to initialise it as a ring first
812809
if category is None:
813810
homset_cat = A.category()
814811
else:
815812
homset_cat = category
816-
# Remark: Ring.__init__ will automatically form the join
813+
# Remark: Parent.__init__ will automatically form the join
817814
# of the category of rings and of homset_cat
818815
Parent.__init__(self, A.base_ring(), category=homset_cat.Endsets())
819816
Homspace.__init__(self, A, A, cat=homset_cat)
@@ -825,7 +822,7 @@ def __init__(self, A, gens=None, category=None):
825822

826823
def _repr_(self):
827824
"""
828-
Return the string representation of self.
825+
Return the string representation of ``self``.
829826
830827
EXAMPLES::
831828
@@ -853,18 +850,16 @@ def abelian_variety(self):
853850

854851
def index_in(self, other, check=True):
855852
"""
856-
Return the index of self in other.
853+
Return the index of ``self`` in ``other``.
857854
858855
INPUT:
859856
860-
861-
- ``other`` - another endomorphism subring of the
857+
- ``other`` -- another endomorphism subring of the
862858
same abelian variety
863859
864-
- ``check`` - bool (default: True); whether to do some
860+
- ``check`` -- bool (default: ``True``); whether to do some
865861
type and other consistency checks
866862
867-
868863
EXAMPLES::
869864
870865
sage: R = J0(33).endomorphism_ring()

src/sage/modular/modsym/ambient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def __init__(self, group, weight, sign, base_ring,
169169

170170
sign = int(sign)
171171
if base_ring not in Fields():
172-
raise TypeError("base_ring must be a commutative ring")
172+
raise TypeError("base_ring must be a field")
173173

174174
if character is None and arithgroup.is_Gamma0(group):
175175
character = TrivialCharacter(group.level(), base_ring)
@@ -2983,7 +2983,7 @@ def _compute_hecke_matrix_prime(self, p, rows=None):
29832983
self._hecke_matrices = {}
29842984
except KeyError:
29852985
pass
2986-
tm = verbose("Computing Hecke operator T_%s" % p)
2986+
tm = verbose(f"Computing Hecke operator T_{p}")
29872987

29882988
H = heilbronn.HeilbronnCremona(p)
29892989
# H = heilbronn.HeilbronnMerel(p)

0 commit comments

Comments
 (0)