From 06cb4cc8f9933ef0520ef8056b8a1980c4f499ee Mon Sep 17 00:00:00 2001 From: Saeed Rasooli Date: Thu, 27 Jun 2024 22:34:58 +0330 Subject: [PATCH] fix ruff 0.5.0 errors --- pyproject.toml | 4 ++-- scal3/event_lib.py | 3 +-- scal3/ui_gtk/day_cal.py | 1 - scal3/ui_gtk/mainwin_items/monthCal.py | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ee5dc52b1..037dce2e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ lint.select = [ "YTT", # flake8-2020 # "ANN", # flake8-annotationsq, still gives errors for `self` # "ASYNC", # flake8-async - "TRIO", # flake8-trio + "ASYNC1", # flake8-trio # "S", # flake8-bandit "BLE", # flake8-blind-except # "FBT", # flake8-boolean-trap @@ -69,7 +69,7 @@ lint.select = [ # To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the `select` or `extend-select` configuration, or adding them to the `ignore` configuration. lint.ignore = [ - "PLR6104", # Use `+=` to perform an augmented assignment directly + # "PLR6104", # Use `+=` to perform an augmented assignment directly # until this bug is fixed: https://github.com/astral-sh/ruff/issues/10911 "PYI034", # py3.11: `__iadd__` methods in classes like `...` usually return `self` at runtime diff --git a/scal3/event_lib.py b/scal3/event_lib.py index 423d19796..da3818bc1 100644 --- a/scal3/event_lib.py +++ b/scal3/event_lib.py @@ -51,7 +51,6 @@ from scal3.core import ( getAbsWeekNumberFromJd, jd_to_primary, - log, ) from scal3.date_utils import checkDate, dateDecode, dateEncode, jwday from scal3.interval_utils import ( @@ -4675,7 +4674,7 @@ def importData( eid = idByUuid.get(uuid) if eid is None: - log.debug("appending event uuid =", uuid) + log.debug(f"appending event uuid = {uuid}") event = self.appendByData(eventData) res.newEventIds.add((gid, event.id)) continue diff --git a/scal3/ui_gtk/day_cal.py b/scal3/ui_gtk/day_cal.py index ee3c96a7e..0c2d63f44 100644 --- a/scal3/ui_gtk/day_cal.py +++ b/scal3/ui_gtk/day_cal.py @@ -26,7 +26,6 @@ from scal3 import core, ui from scal3.cal_types import calTypes -from scal3.core import log from scal3.drawing import getAbsPos from scal3.locale_man import ( getMonthName, diff --git a/scal3/ui_gtk/mainwin_items/monthCal.py b/scal3/ui_gtk/mainwin_items/monthCal.py index fda0d6d08..5f4f64618 100644 --- a/scal3/ui_gtk/mainwin_items/monthCal.py +++ b/scal3/ui_gtk/mainwin_items/monthCal.py @@ -26,7 +26,6 @@ from scal3 import cal_types, core, ui from scal3.cal_types import calTypes -from scal3.core import log from scal3.locale_man import rtl, rtlSgn from scal3.locale_man import tr as _ from scal3.monthcal import getCurrentMonthStatus