From e3e7e2f52e531b1dbdf82c94cec0c390a8dec498 Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Sat, 22 Nov 2025 21:20:46 +1100 Subject: [PATCH] BE: linting fixes 4 Signed-off-by: jokob-sk --- front/plugins/_publisher_webhook/webhook.py | 1 - pyproject.toml | 9 ++++++++- ruff.toml | 4 ---- scripts/checkmk/script.py | 1 - server/initialise.py | 11 ++++++----- 5 files changed, 14 insertions(+), 12 deletions(-) delete mode 100644 ruff.toml diff --git a/front/plugins/_publisher_webhook/webhook.py b/front/plugins/_publisher_webhook/webhook.py index 597e2a8b..538a0178 100755 --- a/front/plugins/_publisher_webhook/webhook.py +++ b/front/plugins/_publisher_webhook/webhook.py @@ -1,4 +1,3 @@ - #!/usr/bin/env python import json diff --git a/pyproject.toml b/pyproject.toml index 043d4550..846b5a7d 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,4 +8,11 @@ markers = [ "docker: requires docker socket and elevated container permissions", "compose: Tests docker compose files. Slow.", "feature_complete: extended coverage suite not run by default", -] \ No newline at end of file +] +[tool.ruff] +line-length = 180 + +[tool.ruff.lint] +select = ["E", "F"] +extend-select = ["E402"] +ignore = ["E203", "C901"] \ No newline at end of file diff --git a/ruff.toml b/ruff.toml deleted file mode 100644 index 0eeecf5d..00000000 --- a/ruff.toml +++ /dev/null @@ -1,4 +0,0 @@ -[lint] -select = ["E", "F"] # or whatever you are using -# Add E402 so Ruff knows the noqa is legitimate -extend-select = ["E402"] diff --git a/scripts/checkmk/script.py b/scripts/checkmk/script.py index ea4cdaf8..6377491a 100755 --- a/scripts/checkmk/script.py +++ b/scripts/checkmk/script.py @@ -1,4 +1,3 @@ - #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ diff --git a/server/initialise.py b/server/initialise.py index 82febc20..88548c76 100755 --- a/server/initialise.py +++ b/server/initialise.py @@ -679,14 +679,15 @@ def importConfigs(pm, db, all_plugins): # ccd(key, default, config_dir, name, inputtype, options, group, events=None, desc="", setJsonMetadata=None, overrideTemplate=None, forceDefault=False) ccd('VERSION', new_version , c_d, '_KEEP_', '_KEEP_', '_KEEP_', '_KEEP_', None, "_KEEP_", None, None, True) - write_notification(f'[Upgrade]: App upgraded from {prev_version} to \ + write_notification( + f"""[Upgrade]: App upgraded from {prev_version} to \ {new_version} 🚀 Please clear the cache: \
  1. Click OK below
  2. \ -
  3. Clear the browser cache (shift + browser refresh button)
  4. \ -
  5. Clear app cache with the (reload) button in the header
  6. \ -
  7. Go to Settings and click Save
\ +
  • Clear the browser cache (shift + browser refresh button)
  • \ +
  • Clear app cache with the (reload) button in the header
  • \ +
  • Go to Settings and click Save
  • \ Check out new features and what has changed in the \ - 📓 release notes.', + 📓 release notes.""", 'interrupt', timeNowDB() )