From 42b3e9858c153a0f0cbab3506ab3884dc549bc91 Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Tue, 26 Mar 2024 21:28:07 +0100 Subject: [PATCH] ruff: Use py312 target version --- foundationsync/indico_foundationsync/sync.py | 2 +- ruff.toml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/foundationsync/indico_foundationsync/sync.py b/foundationsync/indico_foundationsync/sync.py index 2d7f0597..6f05327a 100644 --- a/foundationsync/indico_foundationsync/sync.py +++ b/foundationsync/indico_foundationsync/sync.py @@ -101,7 +101,7 @@ def _parse_room_data(self, raw_data, coordinates, room_id): return data, email_warning def _prepare_row(self, row, cursor): - return dict(zip([d[0] for d in cursor.description], row)) + return dict(zip([d[0] for d in cursor.description], row, strict=True)) def _update_room(self, room, room_data, changes): room.is_deleted = False diff --git a/ruff.toml b/ruff.toml index 3932c4e9..061f2bfe 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,4 +1,4 @@ -target-version = 'py39' +target-version = 'py312' line-length = 120 extend-exclude = ['docs', 'htmlcov', '*.egg-info'] @@ -49,6 +49,7 @@ ignore = [ 'RUF015', # not always more readable, and we don't do it for huge lists 'RUF022', # autofix messes up out formatting instead of just sorting 'RUF027', # also triggers on i18n functions -> too noisy for now + 'UP038', # it looks kind of weird and it slower than a tuple 'D205', # too many docstrings which have no summary line 'D301', # https://github.com/astral-sh/ruff/issues/8696 'D1', # we have way too many missing docstrings :(