Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes by ruff #6120

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lmfdb/classical_modular_forms/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions lmfdb/classical_modular_forms/test_cmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/groups/abstract/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
4 changes: 2 additions & 2 deletions lmfdb/modular_curves/web_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading