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: