From ba01804b96c03f64e34c9ddf8622b45bb449acfa Mon Sep 17 00:00:00 2001 From: kiblik <5609770+kiblik@users.noreply.github.com> Date: Sat, 1 Feb 2025 12:46:33 +0100 Subject: [PATCH] Ruff: Add PLC18 and fix PLC1802 --- dojo/models.py | 2 +- ruff.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dojo/models.py b/dojo/models.py index e75f35ec77..e74b200178 100644 --- a/dojo/models.py +++ b/dojo/models.py @@ -1033,7 +1033,7 @@ def save(self, *args, **kwargs): if (initial_sla_config.low != self.low) or (initial_sla_config.enforce_low != self.enforce_low): severities.append("Low") # if severities have changed, update finding sla expiration dates with those severities - if len(severities): + if severities: # set the async updating flag to true for this sla config self.async_updating = True super().save(*args, **kwargs) diff --git a/ruff.toml b/ruff.toml index 848c249f71..dd82726e19 100644 --- a/ruff.toml +++ b/ruff.toml @@ -73,7 +73,7 @@ select = [ "FIX001", "FIX003", "PD", "PGH", - "PLC01", "PLC0205", "PLC0208", "PLC0414", "PLC24", "PLC3", + "PLC01", "PLC0205", "PLC0208", "PLC0414", "PLC18", "PLC24", "PLC3", "PLE", "PLR01", "PLR0203", "PLR0206", "PLR0915", "PLR1716", "PLR172", "PLR1733", "PLR1736", "PLW0120", "PLW0129", "PLW013", "PLW017", "PLW02", "PLW04", "PLW07", "PLW1", "PLW2", "PLW3",