From 89dd00218ed9c09fbf8b1ca81b7cdb8cbf6f2d54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?=
Date: Mon, 2 Sep 2024 17:27:25 +0200
Subject: [PATCH 04/18] a few typos and more blank lines (pep E302)
---
lmfdb/abvar/fq/download.py | 1 +
lmfdb/abvar/fq/search_parsing.py | 2 ++
lmfdb/elliptic_curves/congruent_numbers.py | 5 +++++
lmfdb/elliptic_curves/isog_class.py | 2 ++
lmfdb/elliptic_curves/test_browse_page.py | 1 +
lmfdb/galois_groups/templates/character-table.html | 2 +-
lmfdb/galois_groups/transitive_group.py | 2 +-
lmfdb/groups/abstract/main.py | 4 ++--
lmfdb/groups/abstract/web_groups.py | 2 +-
lmfdb/hecke_algebras/hecke_algebras_stats.py | 2 ++
lmfdb/hecke_algebras/test_hecke_algebras.py | 1 +
lmfdb/lfunctions/Lfunction.py | 2 ++
lmfdb/lfunctions/test_lfunctions.py | 1 +
lmfdb/maass_forms/templates/maass_browse_graph.html | 2 +-
lmfdb/maass_forms/web_maassform.py | 4 ++--
lmfdb/modular_curves/upload.py | 8 ++++----
lmfdb/modular_curves/web_curve.py | 8 ++++----
lmfdb/uploads/process.py | 2 +-
lmfdb/utils/display_stats.py | 2 +-
lmfdb/utils/downloader.py | 2 +-
lmfdb/utils/uploader.py | 5 +++--
21 files changed, 39 insertions(+), 21 deletions(-)
diff --git a/lmfdb/abvar/fq/download.py b/lmfdb/abvar/fq/download.py
index d47004ea2a..ede1703fea 100644
--- a/lmfdb/abvar/fq/download.py
+++ b/lmfdb/abvar/fq/download.py
@@ -4,6 +4,7 @@
from psycodict.encoding import Json
from .isog_class import AbvarFq_isoclass
+
class AbvarFq_download(Downloader):
table = db.av_fq_isog
title = 'Abelian variety isogeny classes'
diff --git a/lmfdb/abvar/fq/search_parsing.py b/lmfdb/abvar/fq/search_parsing.py
index 92f218e4e5..c1b7e75fb4 100644
--- a/lmfdb/abvar/fq/search_parsing.py
+++ b/lmfdb/abvar/fq/search_parsing.py
@@ -4,11 +4,13 @@
_parse_subset,
)
+
@search_parser # see SearchParser.__call__ for actual arguments when calling
def parse_nf_string(inp, query, qfield):
fields = [nf_string_to_label(field) for field in inp.split(",")]
_parse_subset(fields, query, qfield, mode=None, radical=None, product=None, cardinality=None)
+
@search_parser # (clean_info=True, default_field='galois_group', default_name='Galois group', default_qfield='galois') # see SearchParser.__call__ for actual arguments when calling
def parse_galgrp(inp, query, qfield):
from lmfdb.galois_groups.transitive_group import complete_group_codes
diff --git a/lmfdb/elliptic_curves/congruent_numbers.py b/lmfdb/elliptic_curves/congruent_numbers.py
index fd75646038..cb7b31a9c4 100644
--- a/lmfdb/elliptic_curves/congruent_numbers.py
+++ b/lmfdb/elliptic_curves/congruent_numbers.py
@@ -8,18 +8,23 @@
congruent_number_data_directory = os.path.expanduser('~/data/congruent_number_curves')
+
def CNfilename(file_suffix):
return os.path.join(congruent_number_data_directory, "CN.{}".format(file_suffix))
+
def get_CN_data_old(fs, n):
with open(CNfilename(fs)) as data:
return data.readlines()[n-1].split()
+
def get_CN_data_new(fs, n):
return linecache.getline(CNfilename(fs), n).split()
+
get_CN_data = get_CN_data_new
+
def parse_gens_string(s):
if s == '[]':
return []
diff --git a/lmfdb/elliptic_curves/isog_class.py b/lmfdb/elliptic_curves/isog_class.py
index 86cc20d8c2..dd23323a47 100644
--- a/lmfdb/elliptic_curves/isog_class.py
+++ b/lmfdb/elliptic_curves/isog_class.py
@@ -7,6 +7,7 @@
from sage.all import latex, PowerSeriesRing, QQ, ZZ, RealField
+
class ECisog_class():
"""
Class for an isogeny class of elliptic curves over Q
@@ -187,6 +188,7 @@ def perm(i): return next(c for c in self.curves if c['Cnumber']==i+1)['lmfdb_num
self.code['matrix'] = {'sage':'E.isogeny_class().matrix()'}
self.code['plot'] = {'sage':'E.isogeny_graph().plot(edge_labels=True)'}
+
def make_graph(M, vertex_labels=None):
"""
Code extracted from Sage's elliptic curve isogeny class (reshaped
diff --git a/lmfdb/elliptic_curves/test_browse_page.py b/lmfdb/elliptic_curves/test_browse_page.py
index 955ca085d7..bb2db3e458 100644
--- a/lmfdb/elliptic_curves/test_browse_page.py
+++ b/lmfdb/elliptic_curves/test_browse_page.py
@@ -1,5 +1,6 @@
from lmfdb.tests import LmfdbTest
+
class HomePageTest(LmfdbTest):
# All tests should pass
#
diff --git a/lmfdb/galois_groups/templates/character-table.html b/lmfdb/galois_groups/templates/character-table.html
index e499af1180..14d1358cdb 100644
--- a/lmfdb/galois_groups/templates/character-table.html
+++ b/lmfdb/galois_groups/templates/character-table.html
@@ -3,7 +3,7 @@
{%- set dummy = gp.conjclasses -%}
{%- set ccs = gp.conjugacy_classes -%}
{%- if info.char_highlight -%}
-
The row representing the character {{info.char_highlight}} is highighted below.
+
The row representing the character {{info.char_highlight}} is highlighted below.
{%- endif -%}
diff --git a/lmfdb/galois_groups/transitive_group.py b/lmfdb/galois_groups/transitive_group.py
index 700a636ba0..3d577c4951 100644
--- a/lmfdb/galois_groups/transitive_group.py
+++ b/lmfdb/galois_groups/transitive_group.py
@@ -660,7 +660,7 @@ def complete_group_code(code):
n = int(rematch.group(1))
t = int(rematch.group(2))
return [(n, t)]
- # covert GAP code to abstract group label
+ # convert GAP code to abstract group label
rematch = re.match(r'^\[(\d+),(\d+)\]$', code)
if rematch:
code = "%s.%s" % (rematch.group(1), rematch.group(2))
diff --git a/lmfdb/groups/abstract/main.py b/lmfdb/groups/abstract/main.py
index b0c0df343f..76d1f9f5b1 100644
--- a/lmfdb/groups/abstract/main.py
+++ b/lmfdb/groups/abstract/main.py
@@ -1920,9 +1920,9 @@ def download_group(**args):
# This needs to change for larger groups
if gp_data["solvable"]:
s += com + " The group will be created as a polycylic group (not necessarily matching the presentation in the LMFDB).\n"
- s += com + ' You can turn it into a permuation group using "PermGroup(G)".\n'
+ s += com + ' You can turn it into a permutation group using "PermGroup(G)".\n'
else:
- s += com + " The group will be created as a permuation group (not necessarily using the generators used in the LMFDB).\n"
+ s += com + " The group will be created as a permutation group (not necessarily using the generators used in the LMFDB).\n"
s += com2 + "\n"
s += "\n"
s += "G = small_group(%s,%s)" % tuple(label.split("."))
diff --git a/lmfdb/groups/abstract/web_groups.py b/lmfdb/groups/abstract/web_groups.py
index 8b99231731..0818ed6bd5 100644
--- a/lmfdb/groups/abstract/web_groups.py
+++ b/lmfdb/groups/abstract/web_groups.py
@@ -2674,7 +2674,7 @@ def create_snippet(self,item):
if isinstance(code[item][L],str):
lines = code[item][L].split('\n')[:-1] if '\n' in code[item][L] else [code[item][L]]
lines = [line.replace("<", "<").replace(">", ">") for line in lines]
- else: # not currrently used in groups
+ else: # not currently used in groups
lines = code[item][L]
prompt = code['prompt'][L] if 'prompt' in code and L in code['prompt'] else L
class_str = " ".join([L,'nodisplay','codebox'])
diff --git a/lmfdb/hecke_algebras/hecke_algebras_stats.py b/lmfdb/hecke_algebras/hecke_algebras_stats.py
index 7cc3f94976..6b3d0fc083 100644
--- a/lmfdb/hecke_algebras/hecke_algebras_stats.py
+++ b/lmfdb/hecke_algebras/hecke_algebras_stats.py
@@ -5,6 +5,7 @@
logger = make_logger("hecke_algebras")
+
def hecke_algebras_summary():
hecke_knowl = 'Hecke algebras'
level_knowl = 'level'
@@ -17,6 +18,7 @@ def hecke_algebras_summary():
hecke_knowl,'. The largest ', level_knowl, ' for ', gamma0_knowl, ' is {}, '.format(comma(max_level)),
'the largest ', weight_knowl, ' is {}.'.format(comma(max_weight))])
+
@app.context_processor
def ctx_hecke_algebras_summary():
return {'hecke_algebras_summary': hecke_algebras_summary}
diff --git a/lmfdb/hecke_algebras/test_hecke_algebras.py b/lmfdb/hecke_algebras/test_hecke_algebras.py
index 8a9aa661d9..7865a2dcc9 100644
--- a/lmfdb/hecke_algebras/test_hecke_algebras.py
+++ b/lmfdb/hecke_algebras/test_hecke_algebras.py
@@ -1,6 +1,7 @@
from lmfdb.tests import LmfdbTest
+
class HomePageTest(LmfdbTest):
# Hecke algebra browse page
def test_hecke_algebra(self):
diff --git a/lmfdb/lfunctions/Lfunction.py b/lmfdb/lfunctions/Lfunction.py
index 0d82cc5fc9..d80b1df885 100644
--- a/lmfdb/lfunctions/Lfunction.py
+++ b/lmfdb/lfunctions/Lfunction.py
@@ -129,6 +129,7 @@ def an_from_data(euler_factors,upperbound=30):
return result
+
# Convert the information extracted from the database to the format
# expected by the L-functions homepage template.
# As of July 2015, some of the fields are hard coded specifically
@@ -1325,6 +1326,7 @@ def __init__(self, **args):
def original_object(self):
return self.artin
+
#############################################################################
class HypergeometricMotiveLfunction(Lfunction):
diff --git a/lmfdb/lfunctions/test_lfunctions.py b/lmfdb/lfunctions/test_lfunctions.py
index a3341edc07..941b86f14b 100644
--- a/lmfdb/lfunctions/test_lfunctions.py
+++ b/lmfdb/lfunctions/test_lfunctions.py
@@ -2,6 +2,7 @@
from .LfunctionPlot import paintSvgFileAll
from lmfdb.tests import LmfdbTest
+
class LfunctionTest(LmfdbTest):
# All tests should pass
diff --git a/lmfdb/maass_forms/templates/maass_browse_graph.html b/lmfdb/maass_forms/templates/maass_browse_graph.html
index bf11d1993b..a5220e2105 100644
--- a/lmfdb/maass_forms/templates/maass_browse_graph.html
+++ b/lmfdb/maass_forms/templates/maass_browse_graph.html
@@ -4,7 +4,7 @@
Maass forms of levels {{min_level}} to {{max_level}} with ${{min_R}} \leq R\leq {{max_R}}$
- The horizontal axis is the {{KNOWL('mf.maass.mwf.spectralparameter', title='spectral parameter')}} $R$ with the {{KNOWL('mf.maass.mwf.eigenvalue', title='Laplace eigenvalue')}} satisying $\lambda=1/4+R^2$. The vertical axis is the {{KNOWL('mf.maass.mwf.level', title='level')}} $N$. Each point corresponds to a Maass form of {{KNOWL('mf.maass.mwf.weight', title='weight')}} 0 and trivial character on $\Gamma_0(N)$ with the color showing whether the {{KNOWL('mf.maass.mwf.symmetry', title='symmetry')}} is even or odd.
+ The horizontal axis is the {{KNOWL('mf.maass.mwf.spectralparameter', title='spectral parameter')}} $R$ with the {{KNOWL('mf.maass.mwf.eigenvalue', title='Laplace eigenvalue')}} satisfying $\lambda=1/4+R^2$. The vertical axis is the {{KNOWL('mf.maass.mwf.level', title='level')}} $N$. Each point corresponds to a Maass form of {{KNOWL('mf.maass.mwf.weight', title='weight')}} 0 and trivial character on $\Gamma_0(N)$ with the color showing whether the {{KNOWL('mf.maass.mwf.symmetry', title='symmetry')}} is even or odd.
In the plot below each dot is linked to the homepage of the corresponding {{KNOWL('mf.maass.mwf',title='Maass forms')}}.
diff --git a/lmfdb/maass_forms/web_maassform.py b/lmfdb/maass_forms/web_maassform.py
index a6cfabefaf..5d1aeb5914 100644
--- a/lmfdb/maass_forms/web_maassform.py
+++ b/lmfdb/maass_forms/web_maassform.py
@@ -74,14 +74,14 @@ def rational_coeff_error_notation(factored_n):
if not factored_n: # n = 1
return "1"
for p, e in factored_n:
- res *= (p**(e//2))
+ res *= p**(e//2)
res = 1./res
res = str(res).rstrip('0')
return res
def coeff_error_notation(coeff, error, pm=False):
- r"""Web coefficient and error display, with trunctation"""
+ r"""Web coefficient and error display, with truncation"""
if error == -1:
return r"\mathrm{unknown}"
if pm:
diff --git a/lmfdb/modular_curves/upload.py b/lmfdb/modular_curves/upload.py
index 86fa9788f2..c7d941a2c9 100644
--- a/lmfdb/modular_curves/upload.py
+++ b/lmfdb/modular_curves/upload.py
@@ -36,7 +36,7 @@ class Points(UploadSection):
UTextBox("curve", "Modular curve", "upload.modcurve.name_or_label", name_or_label_for="gps_gl2zhat_fine", label_linker=modcurve_link),
UTextBox("residue_field", "Residue field", "upload.modcurve.residue_field", label_for="nf_fields", label_linker=lambda label: nf_display_knowl(label, label)),
UTextBox("jorig", "$j$-invariant", "upload.modcurve.jinv", remove_spaces=True, re=(jre, "comma separated rationals"), mathmode=True),
- UTextBox("coordinates", "Coordinates", "upload.modcurve.coordinates", remove_spaces=True, re=(coordre, "semicolon separated points, each point giving (weighted) projective coordinates sepatated by colons, with each coordinate specified as a comma separated list of rational numbers"), mathmode=True),
+ UTextBox("coordinates", "Coordinates", "upload.modcurve.coordinates", remove_spaces=True, re=(coordre, "semicolon separated points, each point giving (weighted) projective coordinates separated by colons, with each coordinate specified as a comma separated list of rational numbers"), mathmode=True),
ModelTypeBox("model_type", "Model type"),
USelectBox("isolated", "Isolated", "upload.modcurve.isolated",
[("0", "Unknown"),
@@ -142,7 +142,7 @@ def process(self, rec):
# TODO: compute data["j_height"]
# TODO: compute data["Elabel"], data["ainvs"], data["conductor_norm"]
# TODO: compute data["cm"]; there should be good code for this in Sage
- # BIG TODO: Propogate this point to other modular curves (both up and down, including fine models)
+ # BIG TODO: Propagate this point to other modular curves (both up and down, including fine models)
return [("modcurve_points", True, data)]
@lazy_attribute
@@ -172,7 +172,7 @@ def process(self, rec):
class GonalityBounds(UploadSection):
name = "modcurve_gonality"
title = "Gonality bounds"
- intro = "To update gonality bounds for a single curve, enter it here; these bounds will be propogated to other modular curves."
+ intro = "To update gonality bounds for a single curve, enter it here; these bounds will be propagated to other modular curves."
inputs = [UReferenceBox("reference", "Reference", "upload.reference"),
UTextBox("curve", "Modular curve", "upload.modcurve.name_or_label", name_or_label_for="gps_gl2zhat_fine", label_linker=modcurve_link),
UTextBox("q_gonality", r"$\mathbb{Q}$-gonality", "upload.modcurve.q_gonality", remove_spaces=True, natural_or_range=True),
@@ -212,7 +212,7 @@ def validate(self, rec):
def verify(self, rec):
# TODO: If gonal map specified, we should confirm that its degree matches the provided upper gonality bound
- # We don't do anything further here, since propogation is expensive and we want to wait until the processing stage
+ # We don't do anything further here, since propagation is expensive and we want to wait until the processing stage
pass
def process(self, rec):
diff --git a/lmfdb/modular_curves/web_curve.py b/lmfdb/modular_curves/web_curve.py
index 76d09261e6..cc33f9a35a 100644
--- a/lmfdb/modular_curves/web_curve.py
+++ b/lmfdb/modular_curves/web_curve.py
@@ -172,10 +172,10 @@ def formatted_newforms(newforms, mults):
return ", ".join(f'{label}{showexp(c)}' for (label, c) in zip(newforms, mults))
def formatted_model_html(self, m):
-#this is only for curves with models
-#but not curves with self.has_more_models
-#and also not for genus 0 cuves with points
-#we need to somehow give this info
+ # this is only for curves with models
+ # but not curves with self.has_more_models
+ # and also not for genus 0 curves with points
+ # we need to somehow give this info
eqn_threshold = 3 #this displays threshold - 1 lines to start
eqns, lines, nb_var, typ, smooth = formatted_model_data(m)
def title_of_model(self, lines, nb_var, typ, smooth):
diff --git a/lmfdb/uploads/process.py b/lmfdb/uploads/process.py
index c949322e50..ee81ebd9fa 100644
--- a/lmfdb/uploads/process.py
+++ b/lmfdb/uploads/process.py
@@ -54,7 +54,7 @@ def process_all():
timestamp = datetime.utcnow().isoformat()
status_update[rec["section"]][rec["id"]] = (status, timestamp, comment)
- # There are some sections (like gonality propogation) that want to do more
+ # There are some sections (like gonality propagation) that want to do more
# processing after all inputs are known. By default, we use this function
# just to write status_update to F
for section_name, ids in status_update.items():
diff --git a/lmfdb/utils/display_stats.py b/lmfdb/utils/display_stats.py
index de82fc2866..9a49aaf4e7 100644
--- a/lmfdb/utils/display_stats.py
+++ b/lmfdb/utils/display_stats.py
@@ -475,7 +475,7 @@ def display_data(self, cols, table=None, constraint=None, avg=None,
- ``table`` -- a ``PostgresStatsTable``
- ``cols`` -- a list of column names
- ``constraint`` -- a dictionary giving constraints on other columns.
- Only rows satsifying those constraints are included in the counts.
+ Only rows satisfying those constraints are included in the counts.
- ``avg`` -- whether to include the average value of cols[0]
(cols must be of length 1 with no bucketing)
- ``buckets`` -- a dictionary whose keys are columns, and whose values are lists of strings such as '5' or '2-7'.
diff --git a/lmfdb/utils/downloader.py b/lmfdb/utils/downloader.py
index cef39fd049..f2d2766843 100644
--- a/lmfdb/utils/downloader.py
+++ b/lmfdb/utils/downloader.py
@@ -584,7 +584,7 @@ def get_sort(self, info, query):
"""
This determines the sort order requested from the database.
- OUPUT:
+ OUTPUT:
- a list or other object appropriate for passing as the ``sort`` argument
to the ``search`` method of the search table.
diff --git a/lmfdb/utils/uploader.py b/lmfdb/utils/uploader.py
index c0f6f98db0..07a665cc01 100644
--- a/lmfdb/utils/uploader.py
+++ b/lmfdb/utils/uploader.py
@@ -6,7 +6,7 @@
* An additional validation step is run on a server (anything that might take a nontrivial amount of computation). Entries passing this step are graduated to status 1; failures are marked with status -1.
* Entries passing this step are checked by a human editor; acceptance earns status 2 and failure is marked with status -2.
* Approved entries are then added to the appropriate table by another script run on a server (since this step may also involve nontrivial computation, like with gonality bounds). Entries passing this step are marked with status 3; failures with -3. A successful run of this step produces file(s) for use with copy_from on appropriate tables.
-* Finally, a script executes copy_from. Failure here is unexpected and marked with -4 (due to failue in Postgres loading the file); success is marked with 4.
+* Finally, a script executes copy_from. Failure here is unexpected and marked with -4 (due to failure in Postgres loading the file); success is marked with 4.
* While in stage 0, 1 or 2, uploads can be withdrawn by the submitter. If so, they will be marked with status -5.
"""
@@ -209,6 +209,7 @@ class UploadSection():
inputs = []
offer_csv = True
csv_template_url = None
+
def __init__(self, **kwds):
for key, val in kwds.items():
setattr(self, key, val)
@@ -218,7 +219,7 @@ def validate(self, rec):
This function is called at input time when a user uploads data,
performating basic validation but nothing that takes a long time.
- Failure is immediately reported to the user who attemped to upload data.
+ Failure is immediately reported to the user who attempted to upload data.
"""
for box in self.inputs:
rec[box.name] = box.validate(rec[box.name])
From 3c73fb415965ad3977f5e32114cc965d17219c6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?=
Date: Mon, 2 Sep 2024 17:41:46 +0200
Subject: [PATCH 05/18] more typos
---
lmfdb/ecnf/WebEllipticCurve.py | 2 +-
lmfdb/utils/search_columns.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lmfdb/ecnf/WebEllipticCurve.py b/lmfdb/ecnf/WebEllipticCurve.py
index 1aa169250e..2f04e8b2e4 100644
--- a/lmfdb/ecnf/WebEllipticCurve.py
+++ b/lmfdb/ecnf/WebEllipticCurve.py
@@ -718,7 +718,7 @@ def latex_kod(kod):
# LMFDB labels:
self.base_change_Q = [cremona_label_to_lmfdb_label(lab) for lab in self.base_change if '-' not in lab]
- # sort by conductor (so also unkown curves come last)
+ # sort by conductor (so also unknown curves come last)
self.base_change_Q.sort(key=lambda lab:ZZ(conductor_from_label(lab)))
self.bcQtext = [] # for the Base change section of the home page
for lab in self.base_change_Q:
diff --git a/lmfdb/utils/search_columns.py b/lmfdb/utils/search_columns.py
index 41238d439b..bb79312be5 100644
--- a/lmfdb/utils/search_columns.py
+++ b/lmfdb/utils/search_columns.py
@@ -367,7 +367,7 @@ def download(self, rec, name=None):
class ProcessedLinkCol(ProcessedCol):
"""
- These columns allow for funtions to be applied to the contents retrieved from the database before generating
+ These columns allow for functions to be applied to the contents retrieved from the database before generating
a link. They take three additional inputs:
- ``url_func`` -- a function producing the url from the contents
@@ -392,7 +392,7 @@ class MultiProcessedCol(SearchCol):
- ``inputs`` -- a list of column names from the search table (or that have been created in a postprocessing step)
- ``func`` -- a function taking as input the inputs from a given row and producing a value to be displayed
- - ``apply_download`` -- either a boolean (determing whether the function should be applied when
+ - ``apply_download`` -- either a boolean (determining whether the function should be applied when
downloading), or a function that is applied instead when downloading.
Note that ``download_col`` is still available, and provides an alternative to the use of ``apply_download``.
From 752b9ea7d8a29205ffcba37e4ed999b985a72227 Mon Sep 17 00:00:00 2001
From: edgarcosta
Date: Mon, 2 Sep 2024 15:49:43 +0000
Subject: [PATCH 06/18] autopep8 action fixes
---
lmfdb/modular_curves/web_curve.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lmfdb/modular_curves/web_curve.py b/lmfdb/modular_curves/web_curve.py
index cc33f9a35a..8c6f1b7613 100644
--- a/lmfdb/modular_curves/web_curve.py
+++ b/lmfdb/modular_curves/web_curve.py
@@ -178,6 +178,7 @@ def formatted_model_html(self, m):
# we need to somehow give this info
eqn_threshold = 3 #this displays threshold - 1 lines to start
eqns, lines, nb_var, typ, smooth = formatted_model_data(m)
+
def title_of_model(self, lines, nb_var, typ, smooth):
if typ == 0:
title = display_knowl('ag.canonical_model', 'Canonical model') +\
@@ -209,6 +210,7 @@ def title_of_model(self, lines, nb_var, typ, smooth):
elif typ == 8:
return display_knowl('modcurve.embedded_model', 'Embedded model') +\
r" Embedded model in $\mathbb{P}^{%d}$" % (nb_var-1,)
+
def equation_of_model(lines, typ):
table = '
'+\
'
'+\
From ea359b87a829c36b7d453d72d3e67ca8404d3ca7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?=
Date: Mon, 2 Sep 2024 20:09:30 +0200
Subject: [PATCH 07/18] fix pycodestyle E111 and E222
---
lmfdb/elliptic_curves/elliptic_curve.py | 23 ++++++++++++-----------
lmfdb/elliptic_curves/web_ec.py | 2 +-
lmfdb/groups/abstract/main.py | 4 ++--
lmfdb/groups/abstract/verify.py | 20 ++++++++++----------
lmfdb/groups/abstract/web_groups.py | 21 ++++++++++-----------
lmfdb/modl_galois_representations/main.py | 5 ++++-
lmfdb/modular_curves/web_curve.py | 2 +-
7 files changed, 40 insertions(+), 37 deletions(-)
diff --git a/lmfdb/elliptic_curves/elliptic_curve.py b/lmfdb/elliptic_curves/elliptic_curve.py
index 14eb87b237..5037fb97ae 100644
--- a/lmfdb/elliptic_curves/elliptic_curve.py
+++ b/lmfdb/elliptic_curves/elliptic_curve.py
@@ -764,21 +764,22 @@ def render_curve_webpage_by_label(label):
code = data.code()
code['show'] = {'magma':'','pari':'','sage':'','oscar':''} # use default show names
learnmore_curve_picture = ('Picture description', url_for(".curve_picture_page"))
- T = render_template("ec-curve.html",
- properties=data.properties,
- data=data,
- # set default show names but actually code snippets are filled in only when needed
- code=code,
- bread=data.bread, title=data.title,
- friends=data.friends,
- downloads=data.downloads,
- KNOWL_ID="ec.q.%s"%lmfdb_label,
- BACKUP_KNOWL_ID="ec.q.%s"%data.lmfdb_iso,
- learnmore=learnmore_list_add(*learnmore_curve_picture))
+ T = render_template("ec-curve.html",
+ properties=data.properties,
+ data=data,
+ # set default show names but actually code snippets are filled in only when needed
+ code=code,
+ bread=data.bread, title=data.title,
+ friends=data.friends,
+ downloads=data.downloads,
+ KNOWL_ID="ec.q.%s"%lmfdb_label,
+ BACKUP_KNOWL_ID="ec.q.%s"%data.lmfdb_iso,
+ learnmore=learnmore_list_add(*learnmore_curve_picture))
ec_logger.debug("Total walltime: %ss"%(time.time() - t0))
ec_logger.debug("Total cputime: %ss"%(cputime(cpt0)))
return T
+
@ec_page.route("/data/