Skip to content

Commit 8d3820b

Browse files
authored
Merge pull request #6957 from LMFDB/autopep8-patches
Fixes by autopep8 action
2 parents e5e7293 + d568bc6 commit 8d3820b

3 files changed

Lines changed: 15 additions & 16 deletions

File tree

lmfdb/groups/abstract/main.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,6 @@ def render_abstract_group(label, data=None):
19851985

19861986
bread = get_bread([(gp.label_compress(), "")])
19871987
learnmore_gp_picture = ('Picture description', url_for(".picture_page"))
1988-
19891988

19901989
return render_template(
19911990
"abstract-show-group.html",
@@ -2578,12 +2577,12 @@ def download_group(**args):
25782577

25792578
# Sorted list of abstract group code snippets to download
25802579
sorted_code_names = ["code_description", "order", "exponent", "automorphism_group", "outer_automorphism_group", "composition_factors",
2581-
"nilpotency_class", "derived_length", "is_abelian", "is_cyclic", "is_elementary_abelian", "is_monomial",
2582-
"is_nilpotent", "is_perfect", "is_pgroup", "is_polycyclic", "is_simple", "is_solvable", "is_supersolvable",
2580+
"nilpotency_class", "derived_length", "is_abelian", "is_cyclic", "is_elementary_abelian", "is_monomial",
2581+
"is_nilpotent", "is_perfect", "is_pgroup", "is_polycyclic", "is_simple", "is_solvable", "is_supersolvable",
25832582
"group_statistics", "conjugacy_classes", "character_statistics", "lie_reps_all", "presentation", "permutation",
25842583
"GLZ", "GLFp", "GLZN", "GLZq", "GLFq", "transitive_all", "primary_decomposition", "abelianization",
25852584
"schur_multiplier", "commutator_length", "subgroups", "center", "commutator_subgroup", "frattini_subgroup",
2586-
"fitting_subgroup", "radical", "socle", "derived_series", "chief_series", "lower_central_series",
2585+
"fitting_subgroup", "radical", "socle", "derived_series", "chief_series", "lower_central_series",
25872586
"upper_central_series", "character_table"]
25882587

25892588
@abstract_page.route("/<label>/codedownload/<download_type>")

lmfdb/groups/abstract/web_groups.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2508,7 +2508,7 @@ def show_reps(rtype):
25082508
False, # hide if not present
25092509
display_transitive,
25102510
transitive_expressions_knowl))
2511-
2511+
25122512
# Display code snippets for transitive group representations
25132513
code_cmd = " ".join([self.create_short_snippet(trans) for trans in self.transitive_friends])
25142514
return rep_content + f'<tr><td colspan="6">{code_cmd}</td></tr>'
@@ -2983,14 +2983,14 @@ def create_top_code_snippet(self, code, top_lie, used_lie_gens):
29832983
if lang in code['small_group']:
29842984
code['code_description'][lang] = code['small_group'][lang].format(**{'ordgp':self.order, 'gap_id':gap_id[1]})
29852985
continue
2986-
2986+
29872987
# Check if group is abelian (then can define as product of cyclic groups from its primary decomposition)
29882988
if self.abelian:
29892989
# Sage/Oscar's implementation of AbelianGroup seems to not support most of the usual group functions (probably better to not add this?)
29902990
if (lang in code['abelian_group']) and (lang not in ['sage', 'oscar']):
29912991
code['code_description'][lang] = code['abelian_group'][lang].format(**{'abelian_invariants':self.primary_abelian_invariants})
29922992
continue
2993-
2993+
29942994
# Otherwise, if the group is not in a special family, we will default to showing one of the built-in group constructions
29952995
# (if it exists and is implemented)
29962996
# Highest priority: Permutation group, then PC group, then a matrix group, I guess?
@@ -3016,7 +3016,7 @@ def create_top_code_snippet(self, code, top_lie, used_lie_gens):
30163016

30173017
def create_lie_code_snippets(self, code, top_lie, used_lie_gens):
30183018
"""
3019-
Creates code snippets for the Lie type representations in Magma/GAP/SageMath/Oscar.
3019+
Creates code snippets for the Lie type representations in Magma/GAP/SageMath/Oscar.
30203020
Each Lie representation is stored as a dictionary in the format code[(lie_family, n, q)]
30213021
30223022
For details on how the code logic works, see https://github.com/LMFDB/lmfdb/pull/6694
@@ -3050,7 +3050,7 @@ def create_lie_code_snippets(self, code, top_lie, used_lie_gens):
30503050
code["lie_reps_all"]['magma'] += code[lie_rep_key]['magma']+"\n"
30513051
if top_lie['magma'] is None:
30523052
top_lie['magma'] = code[lie_rep_key]['magma']
3053-
3053+
30543054
for lang in ['gap', 'sage', 'oscar']:
30553055
if lie_rep['family'] in families[lang]:
30563056
code[lie_rep_key][lang] = code[lie_rep_key]['magma'] if lang == 'gap' else "G = "+magma_commands[lie_rep['family']].replace("n,q", str(nLie)+","+str(qLie))
@@ -3079,7 +3079,7 @@ def create_lie_code_snippets(self, code, top_lie, used_lie_gens):
30793079

30803080
if top_lie[lang] is None:
30813081
top_lie[lang], used_lie_gens[lang] = lie_code_snippet, True
3082-
3082+
30833083
# In the case no Lie type representation is implemented natively in Sage or GAP, we display the first one with gens as a matrix group
30843084
# as a code snippet in the "Constructions" header (and as a possible candidate for the top code snippet)
30853085
for lang in code['prompt']:
@@ -3098,7 +3098,7 @@ def create_lie_code_snippets(self, code, top_lie, used_lie_gens):
30983098

30993099
def create_transitive_code_snippets(self, code):
31003100
"""
3101-
Creates code snippets for the transitive group representations
3101+
Creates code snippets for the transitive group representations
31023102
Each representation is stored as a dictionary in the format code[trans_label]
31033103
31043104
For the purposes of the code download command links, all the transitive group representations
@@ -3107,7 +3107,7 @@ def create_transitive_code_snippets(self, code):
31073107

31083108
code["transitive_all"] = {lang:"" for lang in code['prompt']}
31093109
code["transitive_all"]['comment'] = code["transitive"]["comment"]
3110-
3110+
31113111
for trans in self.transitive_friends:
31123112
trans_data = {"deg":trans.split('T')[0], "t":trans.split('T')[1]}
31133113
code[trans] = dict()
@@ -3127,7 +3127,7 @@ def create_transitive_code_snippets(self, code):
31273127

31283128
@cached_method
31293129
def code_snippets(self):
3130-
"""
3130+
"""
31313131
Constructs a dictionary of code snippets for the group
31323132
"""
31333133

@@ -3229,7 +3229,7 @@ def code_snippets(self):
32293229
for rep in ['GLZ', 'GLFp', 'GLZN', 'GLZq', 'GLFq']:
32303230
if rep not in self.representations:
32313231
code[rep] = {}
3232-
3232+
32333233
# Construct code snippets for transitive groups
32343234
self.create_transitive_code_snippets(code)
32353235

lmfdb/tests/generate_snippet_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
'gp': "sage -gp -D prompt='gp> ' -D breakloop=0 -D colors='no,no,no,no,no,no,no' -D readline=0 -q",
2929
'gap': """sage -gap -b -T -r -A -m 256m -o 512m -x 800 -c 'SetUserPreference("UseColorsInTerminal",false);'""",
3030
}
31-
prompt_dict = {'sage': 'sage:', 'sage_gap': 'sage:', 'magma': 'magma> ', 'oscar': 'julia>', 'gp': 'gp> ', 'gap': 'gap> '}
32-
comment_dict = {'magma': '//', 'sage': '#', 'sage_gap': '#',
31+
prompt_dict = {'sage': 'sage:', 'sage_gap': 'sage:', 'magma': 'magma> ', 'oscar': 'julia>', 'gp': 'gp> ', 'gap': 'gap> '}
32+
comment_dict = {'magma': '//', 'sage': '#', 'sage_gap': '#',
3333
'gp': '\\\\', 'pari': '\\\\', 'oscar': '#', 'gap': '#'}
3434

3535

0 commit comments

Comments
 (0)