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

Commit

Permalink
fix failing doctests, pyflakes, block, tiple colon
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAyotte committed Aug 6, 2021
1 parent 6ab4ca9 commit 6984a26
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/sage/modular/modform/ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def polynomial_ring(self, names, gens=None):

def _monomials_of_weight(self, weight, gens, poly_parent):
r"""
Returns the dictionnary of all homogeneous monomials of weight ``weight`` given by
Return the dictionnary of all homogeneous monomials of weight ``weight`` given by
products of generators. The keys of the dictionnary are the monomials living in
`poly_parent` and the values are the modular forms associated to these polynomials.
Expand Down
6 changes: 2 additions & 4 deletions src/sage/modular/quasimodform/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
# ****************************************************************************

from sage.modular.modform.eis_series import eisenstein_series_qexp
from sage.modular.modform.element import GradedModularFormElement, ModularFormElement

from sage.rings.all import Integer, QQ, ZZ
from sage.modular.modform.element import GradedModularFormElement

from sage.structure.element import ModuleElement
from sage.structure.richcmp import richcmp, op_NE, op_EQ
Expand Down Expand Up @@ -107,7 +105,7 @@ def q_expansion(self, prec=6):
An alias of this method is ``qexp``.
EXAMPLES:::
EXAMPLES::
sage: QM = QuasiModularForms()
sage: E2 = QM.0
Expand Down
16 changes: 5 additions & 11 deletions src/sage/modular/quasimodform/ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ def __init__(self, group=1, base_ring=QQ, name='E2'):
Modular Group SL(2,Z)
sage: M.base_ring()
Rational Field
sage: M = QuasiModularForms(1, Integers(5))
sage: M.base_ring()
Ring of integers modulo 5
sage: QuasiModularForms(2)
Traceback (most recent call last):
...
Expand All @@ -145,9 +142,6 @@ def __init__(self, group=1, base_ring=QQ, name='E2'):
Traceback (most recent call last):
...
ValueError: Group (=Ring of integers modulo 5) should be a congruence subgroup
sage: M2 = QuasiModularForms(1, GF(7))
sage: M == M2
False
::
Expand All @@ -166,7 +160,7 @@ def __init__(self, group=1, base_ring=QQ, name='E2'):
raise NotImplementedError("space of quasimodular forms are only implemented for the full modular group")

#Check if the base ring is the rationnal field
if not base_ring != QQ:
if base_ring != QQ:
raise NotImplementedError("base ring other than Q are not yet supported for quasimodular forms ring")

self.__group = group
Expand Down Expand Up @@ -205,8 +199,10 @@ def base_ring(self):
sage: QuasiModularForms(1).base_ring()
Rational Field
sage: QuasiModularForms(1, base_ring=Integers(5)).base_ring()
Ring of integers modulo 5
sage: QuasiModularForms(1, GF(5))
Traceback (most recent call last):
...
NotImplementedError: base ring other than Q are not yet supported for quasimodular forms ring
"""
return self.__base_ring

Expand Down Expand Up @@ -261,8 +257,6 @@ def _repr_(self):
sage: QuasiModularForms(1)._repr_()
'Ring of Quasimodular Forms for Modular Group SL(2,Z) over Rational Field'
sage: QuasiModularForms(1, base_ring=Integers(13))._repr_()
'Ring of Quasimodular Forms for Modular Group SL(2,Z) over Ring of integers modulo 13'
"""
return "Ring of Quasimodular Forms for %s over %s" % (self.group(), self.base_ring())

Expand Down

0 comments on commit 6984a26

Please sign in to comment.