Skip to content

Commit 23cdcff

Browse files
authored
Merge pull request #6351 from fchapoton/some_formatting
fix some code formatting
2 parents f95aa7c + 0a5d910 commit 23cdcff

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

lmfdb/groups/abstract/web_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ def pad(X, m):
19771977
st_latex += "1"
19781978
else:
19791979
st_latex += "0"
1980-
if (i+1)%d == 0:
1980+
if (i + 1) % d == 0:
19811981
st_latex += r' \\ '
19821982
else:
19831983
st_latex += ' & '

lmfdb/local_fields/main.py

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -118,19 +118,19 @@ def local_algebra_display_knowl(labels):
118118

119119
def eisensteinformlatex(pol, unram):
120120
# pol=coeffs, unram =string
121-
R=PolynomialRing(QQ, 'y')
122-
Rx=PolynomialRing(R, 'x')
123-
unram2=R(unram.replace('t','y'))
124-
unram=latex(Rx(unram.replace('t','x')))
125-
pol=R(pol)
126-
l=[]
121+
R = PolynomialRing(QQ, 'y')
122+
Rx = PolynomialRing(R, 'x')
123+
unram2 = R(unram.replace('t', 'y'))
124+
unram = latex(Rx(unram.replace('t', 'x')))
125+
pol = R(pol)
126+
l = []
127127
while pol != 0:
128-
qr=pol.quo_rem(unram2)
128+
qr = pol.quo_rem(unram2)
129129
l.append(qr[1])
130-
pol=qr[0]
131-
newpol=latex(Rx(l))
132-
newpol=newpol.replace('x','('+unram+')')
133-
newpol=newpol.replace('y','x')
130+
pol = qr[0]
131+
newpol = latex(Rx(l))
132+
newpol = newpol.replace('x', '(' + unram + ')')
133+
newpol = newpol.replace('y', 'x')
134134
return newpol
135135

136136
def plot_polygon(verts, polys, inds, p):
@@ -332,6 +332,7 @@ def intcol(j):
332332
return 'not computed'
333333
return f'${j}$'
334334

335+
335336
lf_columns = SearchColumns([
336337
LinkCol("label", "lf.field.label", "Label", url_for_label),
337338
MathCol("n", "lf.degree", "$n$", short_title="degree", default=False),
@@ -476,19 +477,19 @@ def render_field_webpage(args):
476477
else:
477478
wild_inertia = 'Not computed'
478479

479-
if data['f']==1 or data['e']==1:
480-
thepolynomial=raw_typeset(polynomial)
480+
if data['f'] == 1 or data['e'] == 1:
481+
thepolynomial = raw_typeset(polynomial)
481482
else:
482-
eform='$'+eisensteinformlatex(data['coeffs'],data['unram'])+'$'
483-
thepolynomial=raw_typeset(polynomial, eform)
483+
eform = '$' + eisensteinformlatex(data['coeffs'], data['unram']) + '$'
484+
thepolynomial = raw_typeset(polynomial, eform)
484485
info.update({
485486
'polynomial': thepolynomial,
486487
'n': data['n'],
487488
'p': p,
488489
'c': data['c'],
489490
'e': data['e'],
490491
'f': data['f'],
491-
'rf': lf_display_knowl( rflabel, name=printquad(data['rf'], p)),
492+
'rf': lf_display_knowl(rflabel, name=printquad(data['rf'], p)),
492493
'base': lf_display_knowl(str(p)+'.1.0.1', name='$%s$' % Qp),
493494
'hw': data['hw'],
494495
'visible': show_slopes(data['visible']),
@@ -526,7 +527,7 @@ def render_field_webpage(args):
526527
friends.append(('Discriminant root field', rffriend))
527528
if data['is_completion']:
528529
friends.append(('Number fields with this completion',
529-
url_for('number_fields.number_field_render_webpage')+"?completions={}".format(label) ))
530+
url_for('number_fields.number_field_render_webpage')+"?completions={}".format(label)))
530531
downloads = [('Underlying data', url_for('.lf_data', label=label))]
531532

532533
bread = get_bread([(label, ' ')])

0 commit comments

Comments
 (0)