Skip to content

Commit b904488

Browse files
committed
autopep8 action fixes
1 parent 8369d11 commit b904488

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

lmfdb/classical_modular_forms/main.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -309,27 +309,27 @@ def parse_prec(info):
309309
def validate_format_parameter(format_param):
310310
"""
311311
Validate the format parameter for newform display.
312-
312+
313313
Args:
314314
format_param: The format parameter to validate
315-
315+
316316
Returns:
317317
str: validated format parameter (defaults to 'embed' if None or invalid)
318-
318+
319319
Side effects:
320320
Flashes error message if format parameter is invalid
321321
"""
322322
valid_formats = ['embed', 'analytic_embed', 'satake', 'satake_angle']
323-
323+
324324
# Default to 'embed' if format is None
325325
if format_param is None:
326326
return 'embed'
327-
327+
328328
# Check if format is valid
329329
if format_param not in valid_formats:
330330
flash_error("Invalid format parameter '%s'. Valid formats are: %s" % (format_param, ', '.join(valid_formats)))
331331
format_param = 'embed'
332-
332+
333333
return format_param
334334

335335

@@ -384,7 +384,7 @@ def render_newform_webpage(label):
384384

385385
info = to_dict(request.args)
386386
info['display_float'] = display_float
387-
387+
388388
# Validate format parameter
389389
info['format'] = validate_format_parameter(info.get('format'))
390390

lmfdb/classical_modular_forms/test_cmf.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -664,22 +664,20 @@ def test_invalid_format_parameter(self):
664664
assert "Invalid format parameter" in data
665665
assert "txt" in data
666666
assert "Valid formats are:" in data
667-
667+
668668
# Test another invalid format
669669
page = self.tc.get('/ModularForm/GL2/Q/holomorphic/11/2/a/a/?format=invalid')
670670
data = page.get_data(as_text=True)
671671
assert "Invalid format parameter" in data
672672
assert "invalid" in data
673-
673+
674674
# Test that valid formats still work
675675
page = self.tc.get('/ModularForm/GL2/Q/holomorphic/11/2/a/a/?format=embed')
676676
data = page.get_data(as_text=True)
677677
assert "Valid formats are:" not in data
678678
assert "Invalid format parameter" not in data
679-
679+
680680
page = self.tc.get('/ModularForm/GL2/Q/holomorphic/11/2/a/a/?format=satake')
681681
data = page.get_data(as_text=True)
682682
assert "Valid formats are:" not in data
683683
assert "Invalid format parameter" not in data
684-
685-

0 commit comments

Comments
 (0)