Enable flake8-errmsg linting rules (#267)

See https://docs.astral.sh/ruff/rules/#flake8-errmsg-em.
This commit is contained in:
Marc Wrobel
2023-12-30 11:26:28 +01:00
parent fb7c4f6bcc
commit 298ad1a754
4 changed files with 7 additions and 3 deletions

View File

@@ -50,7 +50,8 @@ def parse_datetime(text: str, formats: list[str] = frozenset([
except ValueError:
pass
raise ValueError(f"'{text}' could not be parsed as a date with any of the formats: {str(formats)}")
msg = f"'{text}' could not be parsed as a date with any of the formats: {str(formats)}"
raise ValueError(msg)
def date(year: int, month: int, day: int) -> datetime: