Skip to content

Commit

Permalink
fix database: assert_never for static code analyzers
Browse files Browse the repository at this point in the history
  • Loading branch information
mikez committed Jun 9, 2024
1 parent 7159c27 commit ee9f543
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions things/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import re
import sqlite3
from textwrap import dedent
from typing import Optional, Union
from typing import Optional, Union, assert_never


# --------------------------------------------------
Expand Down Expand Up @@ -1044,7 +1044,7 @@ def make_unixtime_range_filter(date_column: str, offset) -> str:
elif suffix == "y":
modifier = f"-{number} years"
else:
raise ValueError() # for pylint; `validate_offset` already checks this
assert_never(suffix) # for static code analyzers

column_datetime = f"datetime({date_column}, 'unixepoch')"
offset_datetime = f"datetime('now', '{modifier}')"
Expand Down

0 comments on commit ee9f543

Please sign in to comment.