Fixed EM102 (f-string-in-exception): Exception must not use an f-string literal, assign to variable first

This commit is contained in:
Teal Dulcet
2025-06-20 02:40:07 -07:00
parent 54750b1763
commit bf27ac07ed
4 changed files with 16 additions and 8 deletions
+2 -1
View File
@@ -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