ruff: enable and fix C4 ruleset

This commit is contained in:
Dima Gerasimov 2024-08-27 22:50:37 +01:00
parent dee0b128ca
commit 2849870773
19 changed files with 48 additions and 38 deletions

View file

@ -35,7 +35,7 @@ SqliteRowFactory = Callable[[sqlite3.Cursor, sqlite3.Row], Any]
def dict_factory(cursor, row):
fields = [column[0] for column in cursor.description]
return {key: value for key, value in zip(fields, row)}
return dict(zip(fields, row))
Factory = Union[SqliteRowFactory, Literal['row', 'dict']]