Skip to content

Commit b22ee1e

Browse files
author
Release Manager
committed
gh-35918: pep8 cleanup in modular/btquotients and modular/modsym <!-- Please provide a concise, informative and self-explanatory title. --> <!-- Don't put issue numbers in the title. Put it in the Description below. --> <!-- For example, instead of "Fixes #12345", use "Add a new method to multiply two integers" --> ### 📚 Description fix some pycodestyle warnings in `modular/btquotients` and `modular/modsym` <!-- Describe your changes here in detail. --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x ]`. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #35918 Reported by: Frédéric Chapoton Reviewer(s): Matthias Köppe, Travis Scrimshaw
2 parents 0c9ab0e + 413c150 commit b22ee1e

File tree

13 files changed

+249
-251
lines changed

13 files changed

+249
-251
lines changed

src/sage/modular/btquotients/btquotient.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
from sage.modular.arithgroup.all import Gamma0
5858
from sage.modular.arithgroup.congroup_gammaH import GammaH_constructor
5959
from sage.modular.dirichlet import DirichletGroup
60-
lazy_import("sage.plot.colors", "rainbow")
6160
from sage.quadratic_forms.quadratic_form import QuadraticForm
6261
from sage.rings.finite_rings.finite_field_constructor import GF
6362
from sage.rings.finite_rings.integer_mod_ring import Zmod
@@ -69,6 +68,7 @@
6968
from sage.rings.rational_field import QQ
7069
from sage.structure.sage_object import SageObject
7170
from sage.structure.unique_representation import UniqueRepresentation
71+
lazy_import("sage.plot.colors", "rainbow")
7272

7373

7474
class DoubleCosetReduction(SageObject):
@@ -1435,7 +1435,8 @@ def __classcall__(cls, p, Nminus, Nplus=1, character=None,
14351435
True
14361436
"""
14371437
return super().__classcall__(cls, p, Nminus, Nplus,
1438-
character, use_magma, seed, magma_session)
1438+
character, use_magma,
1439+
seed, magma_session)
14391440

14401441
def __init__(self, p, Nminus, Nplus=1, character=None,
14411442
use_magma=False, seed=None, magma_session=None):

src/sage/modular/btquotients/pautomorphicform.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,16 +1913,14 @@ def integrate(self, f, center=1, level=0, method='moments'):
19131913
if method == 'riemann_sum':
19141914
for e in E:
19151915
ii += 1
1916-
#print(ii,"/",len(E))
19171916
exp = ((R1([e[1, 1], e[1, 0]])) ** (self.parent()._U.weight()) * e.determinant() ** (-(self.parent()._U.weight()) / 2)) * f(R1([e[0, 1], e[0, 0]]) / R1([e[1, 1], e[1, 0]]))
1918-
#exp = R2([tmp[jj] for jj in range(self.parent()._k-1)])
1917+
# exp = R2([tmp[jj] for jj in range(self.parent()._k-1)])
19191918
new = eval_dist_at_powseries(self.evaluate(e), exp.truncate(self.parent()._U.weight() + 1))
19201919
value += new
19211920
elif method == 'moments':
19221921
n = self.parent()._U.weight()
19231922
for e in E:
19241923
ii += 1
1925-
#print(ii,"/",len(E))
19261924
a, b, c, d = e.list()
19271925
delta = e.determinant()
19281926
verbose('%s' % (R2([e[0, 1], e[0, 0]])
@@ -2272,7 +2270,7 @@ def __init__(self, domain, U, prec=None, t=None, R=None,
22722270
self._R = Qp(domain._p, prec)
22732271
else:
22742272
self._R = R
2275-
#U is a CoefficientModuleSpace
2273+
# U is a CoefficientModuleSpace
22762274
if isinstance(U, Integer):
22772275
if t is None:
22782276
if overconvergent:
@@ -2281,11 +2279,11 @@ def __init__(self, domain, U, prec=None, t=None, R=None,
22812279
t = 0
22822280
if overconvergent:
22832281
self._U = OverconvergentDistributions(U - 2, base=self._R,
2284-
prec_cap=U - 1 + t,
2285-
act_on_left=True,
2286-
adjuster=_btquot_adjuster(),
2287-
dettwist=-ZZ((U - 2) // 2),
2288-
act_padic=True)
2282+
prec_cap=U - 1 + t,
2283+
act_on_left=True,
2284+
adjuster=_btquot_adjuster(),
2285+
dettwist=-ZZ((U - 2) // 2),
2286+
act_padic=True)
22892287
else:
22902288
self._U = Symk(U - 2, base=self._R, act_on_left=True,
22912289
adjuster=_btquot_adjuster(),
@@ -2485,13 +2483,14 @@ def _element_constructor_(self, data):
24852483
F = []
24862484
Uold = data.parent()._U
24872485
for ii in range(len(data._F)):
2488-
newtmp = data.parent()._Sigma0(E[ii].rep.inverse(), check=False) * Uold(data._F[ii],normalize=False)
2486+
newtmp = data.parent()._Sigma0(E[ii].rep.inverse(), check=False) * Uold(data._F[ii],
2487+
normalize=False)
24892488
tmp.append(newtmp)
24902489
F.append(newtmp)
2491-
A = data.parent()._Sigma0(Matrix(QQ,2,2,[0,1/self.prime(),1,0]),check=False)
2490+
A = data.parent()._Sigma0(Matrix(QQ, 2, 2, [0, ~self.prime(), 1, 0]), check=False)
24922491
for ii in range(len(data._F)):
24932492
F.append(-(A * tmp[ii]))
2494-
vals = self._make_invariant([self._U(o,normalize=False) for o in F])
2493+
vals = self._make_invariant([self._U(o, normalize=False) for o in F])
24952494
return self.element_class(self, vals)
24962495
if data == 0:
24972496
return self.zero()
@@ -2605,11 +2604,12 @@ def _make_invariant(self, F):
26052604
m = M[ii]
26062605
for v in Si:
26072606
s += 1
2608-
g = self._Sigma0(m.adjugate() * self._source.embed_quaternion(v[0], prec=self._prec).adjugate() * m,check=False)
2607+
g = self._Sigma0(m.adjugate() * self._source.embed_quaternion(v[0], prec=self._prec).adjugate() * m,
2608+
check=False)
26092609
newFi += g * x
26102610
newF.append((QQ(1) / s) * newFi)
26112611
else:
2612-
newF.append(self._U(x,normalize=False))
2612+
newF.append(self._U(x, normalize=False))
26132613
return newF
26142614

26152615
def _apply_Up_operator(self, f, scale=False, original_moments=None):
@@ -2650,7 +2650,8 @@ def _apply_Up_operator(self, f, scale=False, original_moments=None):
26502650
for gg, edge_list in HeckeData:
26512651
u = edge_list[jj]
26522652
tprec = 2 * (prec_cap + u.power) + 1
2653-
r = S0(self._p ** -u.power * (u.t(tprec) * gg).adjugate(),check=False)
2653+
r = S0(self._p ** -u.power * (u.t(tprec) * gg).adjugate(),
2654+
check=False)
26542655
tmp += r * f._value[u.label]
26552656
tmp *= factor
26562657
for ii in range(self._n + 1):

0 commit comments

Comments
 (0)