mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-04-15 23:47:24 +02:00
Fixed EM102 (f-string-in-exception): Exception must not use an f-string literal, assign to variable first
This commit is contained in:
@@ -608,7 +608,8 @@ def valid_date(string):
|
||||
try:
|
||||
date = dateutil.parser.parse(string)
|
||||
except ValueError:
|
||||
raise argparse.ArgumentTypeError(f"Unrecognized date and/or time '{string}'")
|
||||
msg = f"Unrecognized date and/or time '{string}'"
|
||||
raise argparse.ArgumentTypeError(msg)
|
||||
return date
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user