diff options
author | pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> | 2023-05-30 02:53:34 +0000 |
---|---|---|
committer | Hugo <hugo@whynothugo.nl> | 2023-05-30 09:18:47 +0200 |
commit | ff9591eb17e01a52262804442c9dc59adfdcae93 (patch) | |
tree | 3c5a890d0b4bebd541c32b2544c38391ce93b8bc | |
parent | 4920f435d4175c9ef003b7d406df1b1240e01850 (diff) |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
-rw-r--r-- | khal/parse_datetime.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/khal/parse_datetime.py b/khal/parse_datetime.py index 35cfac05..34b3784f 100644 --- a/khal/parse_datetime.py +++ b/khal/parse_datetime.py @@ -293,8 +293,7 @@ def guesstimedeltafstr(delta_string: str) -> dt.timedelta: tups = re.split(r'(-?\d+)', delta_string) if not re.match(r'^\s*$', tups[0]): - raise ValueError('Invalid beginning of timedelta string "%s": "%s"' - % (delta_string, tups[0])) + raise ValueError(f'Invalid beginning of timedelta string "{delta_string}": "{tups[0]}"') tups = tups[1:] res = dt.timedelta() @@ -317,8 +316,7 @@ def guesstimedeltafstr(delta_string: str) -> dt.timedelta: ulower == 'sec'): res += dt.timedelta(seconds=numint) else: - raise ValueError('Invalid unit in timedelta string "%s": "%s"' - % (delta_string, unit)) + raise ValueError(f'Invalid unit in timedelta string "{delta_string}": "{unit}"') return res |