From 48fb9338b7ec5b778e306cb1907d4589683b7875 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?=
Date: Thu, 18 Jul 2024 14:59:06 +0200
Subject: [PATCH 1/3] fixes by ruff
---
lmfdb/classical_modular_forms/main.py | 4 ++--
lmfdb/classical_modular_forms/test_cmf.py | 10 +++++-----
lmfdb/groups/abstract/main.py | 2 +-
lmfdb/modular_curves/web_curve.py | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/lmfdb/classical_modular_forms/main.py b/lmfdb/classical_modular_forms/main.py
index d497a79789..89e6641a38 100644
--- a/lmfdb/classical_modular_forms/main.py
+++ b/lmfdb/classical_modular_forms/main.py
@@ -788,7 +788,7 @@ def newform_parse(info, query):
query['is_largest'] = False
parse_ints(info, query, 'hecke_ring_index')
parse_ints(info, query, 'hecke_ring_generator_nbound')
- if 'projective_image_type' in info and not 'projective_image' in info:
+ if 'projective_image_type' in info and 'projective_image' not in info:
query['projective_image_type'] = info['projective_image_type']
elif info.get('projective_image','').lower() in ["dn","dihedral"]:
query["projective_image_type"] = "Dn"
@@ -850,7 +850,7 @@ def _AL_col(i, p):
align="center", short_title="projective image"),
MultiProcessedCol("cm", "cmf.self_twist", "CM",
["is_cm", "cm_discs"],
- lambda is_cm, cm_discs: ", ".join(map(quad_field_knowl, cm_discs)) if is_cm else ("None" if is_cm == False else "not computed"),
+ lambda is_cm, cm_discs: ", ".join(map(quad_field_knowl, cm_discs)) if is_cm else ("None" if is_cm is False else "not computed"),
short_title="CM",
download_col="cm_discs"),
MultiProcessedCol("rm", "cmf.self_twist", "RM",
diff --git a/lmfdb/classical_modular_forms/test_cmf.py b/lmfdb/classical_modular_forms/test_cmf.py
index 462a38405b..3a4d572ae8 100644
--- a/lmfdb/classical_modular_forms/test_cmf.py
+++ b/lmfdb/classical_modular_forms/test_cmf.py
@@ -281,18 +281,18 @@ def test_maximal(self):
assert '1234.2.b.c' in page.get_data(as_text=True)
page = self.tc.get("/ModularForm/GL2/Q/holomorphic/?level=1234&weight=2&is_maximal_largest=maximal")
assert 'unique match' in page.get_data(as_text=True)
- assert not '1234.2.a.h' in page.get_data(as_text=True)
+ assert '1234.2.a.h' not in page.get_data(as_text=True)
assert '1234.2.a.i' in page.get_data(as_text=True)
- assert not '1234.2.b.c' in page.get_data(as_text=True)
+ assert '1234.2.b.c' not in page.get_data(as_text=True)
page = self.tc.get("/ModularForm/GL2/Q/holomorphic/?level=1234&weight=2&is_maximal_largest=largest")
assert '5 matches' in page.get_data(as_text=True)
assert '1234.2.a.h' in page.get_data(as_text=True)
assert '1234.2.a.i' in page.get_data(as_text=True)
- assert not '1234.2.b.c' in page.get_data(as_text=True)
+ assert '1234.2.b.c' not in page.get_data(as_text=True)
page = self.tc.get("/ModularForm/GL2/Q/holomorphic/?level=1234&weight=2&is_maximal_largest=notlargest")
assert '10 matches' in page.get_data(as_text=True)
- assert not '1234.2.a.h' in page.get_data(as_text=True)
- assert not '1234.2.a.i' in page.get_data(as_text=True)
+ assert '1234.2.a.h' not in page.get_data(as_text=True)
+ assert '1234.2.a.i' not in page.get_data(as_text=True)
assert '1234.2.b.c' in page.get_data(as_text=True)
def test_dim_table(self):
diff --git a/lmfdb/groups/abstract/main.py b/lmfdb/groups/abstract/main.py
index 6b83f65f3e..9f7afabace 100644
--- a/lmfdb/groups/abstract/main.py
+++ b/lmfdb/groups/abstract/main.py
@@ -1446,7 +1446,7 @@ def postprocess(self, res, info, query): # need to convert representatives to h
if not hasattr(self, 'counter_to_label'):
self.counter_to_label = {} # initialize dictionary
gptuple = (res['group_order'],res['group_counter']) # have we already found this group
- if not gptuple in self.counter_to_label:
+ if gptuple not in self.counter_to_label:
query_pow = {} # need this dict to get all the power labels
query_pow['group_order'] = res['group_order']
query_pow['group_counter'] = res['group_counter']
diff --git a/lmfdb/modular_curves/web_curve.py b/lmfdb/modular_curves/web_curve.py
index 50b2b67471..76d09261e6 100644
--- a/lmfdb/modular_curves/web_curve.py
+++ b/lmfdb/modular_curves/web_curve.py
@@ -187,10 +187,10 @@ def title_of_model(self, lines, nb_var, typ, smooth):
return title
elif typ == 2:
#smooth is true, false, or none
- if smooth == True:
+ if smooth is True:
return display_knowl('modcurve.plane_model', 'Smooth plane model')+\
" Smooth plane model"
- elif smooth == False:
+ elif smooth is False:
return display_knowl('modcurve.plane_model', 'Singular plane model') +\
" Singular plane model"
else:
From 079aa37e9d2617190e3b8f0ea55a1b8727274558 Mon Sep 17 00:00:00 2001
From: Jen Paulhus
Date: Tue, 23 Jul 2024 15:37:08 -0400
Subject: [PATCH 2/3] update affiliation
---
CONTRIBUTORS.yaml | 4 ++--
lmfdb/groups/abstract/templates/abstract-show-group.html | 5 +++--
lmfdb/templates/management.html | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/CONTRIBUTORS.yaml b/CONTRIBUTORS.yaml
index 6777d5dd61..0babaf39fe 100644
--- a/CONTRIBUTORS.yaml
+++ b/CONTRIBUTORS.yaml
@@ -280,8 +280,8 @@ email: aurel.page@normalesup.org
affil: University of Bordeaux
---
name: Jennifer Paulhus
-affil: Grinnell College
-url: https://www.math.grinnell.edu/~paulhusj/
+affil: Mount Holyoke College
+url: https://www.jenpaulhus.com
---
name: David Platt
affil: University of Bristol
diff --git a/lmfdb/groups/abstract/templates/abstract-show-group.html b/lmfdb/groups/abstract/templates/abstract-show-group.html
index 326925028d..62c613c651 100644
--- a/lmfdb/groups/abstract/templates/abstract-show-group.html
+++ b/lmfdb/groups/abstract/templates/abstract-show-group.html
@@ -44,9 +44,10 @@ Group information
{{info.boolean_characteristics_string | safe}}
+{% if gp.order_stats != None %}
Group statistics
- {% if gp.order_stats != None %}
+