Skip to content

Commit

Permalink
Merge pull request #6272 from LMFDB/autopep8-patches
Browse files Browse the repository at this point in the history
Fixes by autopep8 action
  • Loading branch information
roed314 authored Nov 20, 2024
2 parents 4d06fb2 + 65cba4b commit c48efd7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lmfdb/characters/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def common_parse(info, query):
primitive_orbit = class_to_int(parts_of_label[1])+1
if db.char_dirichlet.count({'modulus':primitive_modulus,'is_primitive':True,'orbit':primitive_orbit}) == 0:
raise ValueError("Primitive character orbit not found")

def incompatible(query):
cond = query.get('conductor')
if cond is None:
Expand All @@ -185,8 +186,8 @@ def incompatible(query):
return cond != primitive_modulus
opts = parse_range3(info['conductor'], lower_bound=1, upper_bound=ORBIT_MAX_MOD)
for opt in opts:
if (isinstance(opt, int) and opt == primitive_modulus or
not isinstance(opt, int) and opt[0] <= primitive_modulus <= opt[1]):
if (isinstance(opt, int) and opt == primitive_modulus
or not isinstance(opt, int) and opt[0] <= primitive_modulus <= opt[1]):
return False
return True
if incompatible(query):
Expand Down

0 comments on commit c48efd7

Please sign in to comment.