From 6984a26e74439171831704266b8d47a1c8c0b8dd Mon Sep 17 00:00:00 2001 From: DavidAyotte Date: Fri, 6 Aug 2021 09:25:48 -0400 Subject: [PATCH] fix failing doctests, pyflakes, block, tiple colon --- src/sage/modular/modform/ring.py | 2 +- src/sage/modular/quasimodform/element.py | 6 ++---- src/sage/modular/quasimodform/ring.py | 16 +++++----------- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/sage/modular/modform/ring.py b/src/sage/modular/modform/ring.py index ed76740b4e2..413c06fea18 100644 --- a/src/sage/modular/modform/ring.py +++ b/src/sage/modular/modform/ring.py @@ -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. diff --git a/src/sage/modular/quasimodform/element.py b/src/sage/modular/quasimodform/element.py index 04c99e5c452..c1edff5a0b6 100644 --- a/src/sage/modular/quasimodform/element.py +++ b/src/sage/modular/quasimodform/element.py @@ -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 @@ -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 diff --git a/src/sage/modular/quasimodform/ring.py b/src/sage/modular/quasimodform/ring.py index a1388eca123..e6841a9b8c1 100644 --- a/src/sage/modular/quasimodform/ring.py +++ b/src/sage/modular/quasimodform/ring.py @@ -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): ... @@ -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 :: @@ -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 @@ -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 @@ -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())