Skip to content

Commit e52e968

Browse files
author
Release Manager
committed
Trac #34919: fix E266 in modular
about {{{ E266 too many leading '#' for block comment }}} URL: https://trac.sagemath.org/34919 Reported by: chapoton Ticket author(s): Frédéric Chapoton Reviewer(s): Matthias Koeppe
2 parents 273d12b + eb44bfa commit e52e968

File tree

11 files changed

+271
-270
lines changed

11 files changed

+271
-270
lines changed

src/sage/modular/arithgroup/arithgroup_perm.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ def sl2z_word_problem(A):
147147
True
148148
"""
149149
A = SL2Z(A)
150-
output=[]
150+
output = []
151151

152-
## If A00 is zero
152+
# If A00 is zero
153153
if A[0,0]==0:
154154
c=A[1,1]
155155
if c != 1:
@@ -167,20 +167,20 @@ def sl2z_word_problem(A):
167167
n=(-A[0,1]/A[0,0]).ceil() #n s.t. 0 <= A[0,1]+n*A[0,0] < A[0,0]
168168
A=A*Lm**n
169169
output.append((0, -n))
170-
## At this point A00>0 and A01>=0
170+
# At this point A00>0 and A01>=0
171171
while not (A[0,0]==0 or A[0,1]==0):
172172
if A[0,0]>A[0,1]:
173173
n=(A[0,0]/A[0,1]).floor()
174174
A=A*SL2Z([1,0,-n,1])
175175
output.append((1, n))
176176

177-
else: #A[0,0]<=A[0,1]
177+
else: # A[0,0]<=A[0,1]
178178
n=(A[0,1]/A[0,0]).floor()
179179
A=A*SL2Z([1,-n,0,1])
180180
output.append((0, n))
181181

182182
if A==SL2Z(1):
183-
pass #done, so don't add R^0
183+
pass # done, so don't add R^0
184184
elif A[0,0]==0:
185185
c=A[1,1]
186186
if c != 1:

src/sage/modular/buzzard.py

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
_gp = None
2525

26+
2627
def gp():
2728
r"""
2829
Return a copy of the GP interpreter with the appropriate files loaded.
@@ -41,32 +42,32 @@ def gp():
4142
_gp.read("Tpprog.g")
4243
return _gp
4344

44-
## def buzzard_dimension_cusp_forms(eps, k):
45-
## r"""
46-
## eps is [N, i x 3 matrix], where eps[2][,1] is the primes dividing
47-
## N, eps[2][,2] is the powers of these primes that divide N, and eps[2][,3]
48-
## is the following: for p odd, p^n||N, it's t such that znprimroot(p^n)
49-
## gets sent to exp(2*pi*i/phi(p^n))^t. And for p=2, it's
50-
## 0 for 2^1, it's 0 (trivial) or -1 (non-trivial) for 2^2, and for p^n>=8
51-
## it's either t>=0 for the even char sending 5 to exp(2*pi*i/p^(n-2))^t,
52-
## or t<=-1 for the odd char sending 5 to exp(2*pi*i/p^(n-2))^(-1-t).
53-
## (so either 0<=t<2^(n-2) or -1>=t>-1-2^(n-2) )
54-
55-
## EXAMPLES::
56-
57-
## sage: buzzard_dimension_cusp_forms('TrivialCharacter(100)', 4)
58-
59-
## Next we compute a dimension for the character of level 45 which is
60-
## the product of the character of level 9 sending znprimroot(9)=2 to
61-
## $e^{2 \pi i/6}^1$ and the character of level 5 sending
62-
## \code{znprimroot(5)=2} to $e^{2 \pi i/4}^2=-1$.
63-
64-
## sage: buzzard_dimension_cusp_forms('DirichletCharacter(45,[1,2])', 4)
65-
## <boom!> which is why this is commented out!
66-
## """
67-
## s = gp().eval('DimensionCuspForms(%s, %s)'%(eps,k))
68-
## print(s)
69-
## return Integer(s)
45+
# def buzzard_dimension_cusp_forms(eps, k):
46+
# r"""
47+
# eps is [N, i x 3 matrix], where eps[2][,1] is the primes dividing
48+
# N, eps[2][,2] is the powers of these primes that divide N, and eps[2][,3]
49+
# is the following: for p odd, p^n||N, it's t such that znprimroot(p^n)
50+
# gets sent to exp(2*pi*i/phi(p^n))^t. And for p=2, it's
51+
# 0 for 2^1, it's 0 (trivial) or -1 (non-trivial) for 2^2, and for p^n>=8
52+
# it's either t>=0 for the even char sending 5 to exp(2*pi*i/p^(n-2))^t,
53+
# or t<=-1 for the odd char sending 5 to exp(2*pi*i/p^(n-2))^(-1-t).
54+
# (so either 0<=t<2^(n-2) or -1>=t>-1-2^(n-2) )
55+
56+
# EXAMPLES::
57+
58+
# sage: buzzard_dimension_cusp_forms('TrivialCharacter(100)', 4)
59+
60+
# Next we compute a dimension for the character of level 45 which is
61+
# the product of the character of level 9 sending znprimroot(9)=2 to
62+
# $e^{2 \pi i/6}^1$ and the character of level 5 sending
63+
# \code{znprimroot(5)=2} to $e^{2 \pi i/4}^2=-1$.
64+
65+
# sage: buzzard_dimension_cusp_forms('DirichletCharacter(45,[1,2])', 4)
66+
# <boom!> which is why this is commented out!
67+
# """
68+
# s = gp().eval('DimensionCuspForms(%s, %s)'%(eps,k))
69+
# print(s)
70+
# return Integer(s)
7071

7172

7273
def buzzard_tpslopes(p, N, kmax):

src/sage/modular/hypergeometric_motive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ def primitive_data(self):
10941094
d = gcd(g)
10951095
return HypergeometricData(gamma_list=[x / d for x in g])
10961096

1097-
### L-functions
1097+
# ----- L-functions -----
10981098

10991099
def gauss_table(self, p, f, prec):
11001100
"""

src/sage/modular/modform/eis_series.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ def eisenstein_series_qexp(k, prec=10, K=QQ, var='q', normalization='linear'):
125125
- David Loeffler (2012-03-15): add options for alternative normalizations
126126
(motivated by :trac:`12043`)
127127
"""
128-
## we use this to prevent computation if it would fail anyway.
129-
if k <= 0 or k % 2 == 1 :
128+
# we use this to prevent computation if it would fail anyway.
129+
if k <= 0 or k % 2 == 1:
130130
raise ValueError("k must be positive and even")
131131

132132
a0 = - bernoulli(k) / (2*k)

src/sage/modular/modform/space.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,13 +1802,13 @@ def embedded_submodule(self):
18021802
# raise ArithmeticError, "Intersection of %s and %s not defined."%\
18031803
# (self, right)
18041804
# V = self.embedded_submodule().intersection(right.embedded_submodule())
1805-
## return ModularForms(self.ambient_module(),V)
1805+
# return ModularForms(self.ambient_module(),V)
18061806
# return self.span([ self(b) for b in V.basis() ])
18071807

1808-
## def _key(self):
1809-
## if self.is_ambient():
1810-
## return self.__key
1811-
## return self.__ambient
1808+
# def _key(self):
1809+
# if self.is_ambient():
1810+
# return self.__key
1811+
# return self.__ambient
18121812

18131813
def level(self):
18141814
"""

src/sage/modular/modform_hecketriangle/abstract_space.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -693,9 +693,9 @@ def weight_parameters(self):
693693
if (n == infinity):
694694
# TODO: Figure out what to do in this case
695695
# (l1 and l2 are no longer defined in an analog/unique way)
696-
#l2 = num % ZZ(2)
697-
#l1 = ((num-l2)/ZZ(2)).numerator()
698-
## TODO: The correct generalization seems (l1,l2) = (0,num)
696+
# l2 = num % ZZ(2)
697+
# l1 = ((num-l2)/ZZ(2)).numerator()
698+
# TODO: The correct generalization seems (l1,l2) = (0,num)
699699
l2 = ZZ(0)
700700
l1 = num
701701
else:

src/sage/modular/pollack_stevens/distributions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ def random_element(self, M=None, **args):
567567
M = self.precision_cap()
568568
R = self.base_ring()
569569
return self((R ** M).random_element(**args))
570-
## return self(self.approx_module(M).random_element())
570+
# return self(self.approx_module(M).random_element())
571571

572572
def clear_cache(self):
573573
"""

0 commit comments

Comments
 (0)