From 2077c27252b33454bb33525c132565bd2e9a2b7b Mon Sep 17 00:00:00 2001 From: 3252a8 <3252a8@proton.me> Date: Sun, 7 Jun 2026 23:57:06 +0300 Subject: [PATCH] chore: align local checks --- .dockerignore | 1 + backend/bot/payment_providers/paykilla.py | 3 +-- backend/bot/services/subscription_service_impl/lifecycle.py | 6 ++---- frontend/src/lib/webapp/devicesLabels.js | 3 +-- tests/test_webapp_assets.py | 2 +- tests/test_webapp_devices_labels.py | 1 - 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.dockerignore b/.dockerignore index e76f0cf..0af9869 100644 --- a/.dockerignore +++ b/.dockerignore @@ -16,6 +16,7 @@ frontend/node_modules/ docs-site/node_modules/ docs-site/.astro/ docs-site/dist/ +docs-site/public/demo/runtime/ docs-site/src/content/docs/ frontend-nginx-dist/ deploy/compose/docker-compose-dev.yml diff --git a/backend/bot/payment_providers/paykilla.py b/backend/bot/payment_providers/paykilla.py index a7cdbb3..b618fa0 100644 --- a/backend/bot/payment_providers/paykilla.py +++ b/backend/bot/payment_providers/paykilla.py @@ -661,8 +661,7 @@ class PaykillaService(HttpClientMixin): return cached_data if response.status != 200 or not isinstance(response_data, list): logging.warning( - "Paykilla currency metadata request failed " - "(status=%s, body=%s)", + "Paykilla currency metadata request failed (status=%s, body=%s)", response.status, response_data, ) diff --git a/backend/bot/services/subscription_service_impl/lifecycle.py b/backend/bot/services/subscription_service_impl/lifecycle.py index fbd2b79..cdc1a94 100644 --- a/backend/bot/services/subscription_service_impl/lifecycle.py +++ b/backend/bot/services/subscription_service_impl/lifecycle.py @@ -832,8 +832,7 @@ class SubscriptionLifecycleMixin: traffic_limit = ( self._traffic_limit_for_period_tariff(bonus_tariff) if bonus_tariff - else - self.settings.user_traffic_limit_bytes + else self.settings.user_traffic_limit_bytes if apply_main_traffic_limit else self.settings.trial_traffic_limit_bytes ) @@ -922,8 +921,7 @@ class SubscriptionLifecycleMixin: traffic_limit_bytes=( updated_sub_model.traffic_limit_bytes if bonus_tariff - else - self.settings.user_traffic_limit_bytes + else self.settings.user_traffic_limit_bytes if apply_main_traffic_limit and not preserve_tariff_limits else None ), diff --git a/frontend/src/lib/webapp/devicesLabels.js b/frontend/src/lib/webapp/devicesLabels.js index 4906757..041ed43 100644 --- a/frontend/src/lib/webapp/devicesLabels.js +++ b/frontend/src/lib/webapp/devicesLabels.js @@ -24,8 +24,7 @@ export function devicesCountLabel(devicesData, t, maxDevicesOverride) { export function devicesPercent(devicesData, maxDevicesOverride) { const current = Number(devicesData?.current_devices ?? devicesData?.devices?.length ?? 0); - const maxValue = - maxDevicesOverride !== undefined ? maxDevicesOverride : devicesData?.max_devices; + const maxValue = maxDevicesOverride !== undefined ? maxDevicesOverride : devicesData?.max_devices; if (maxValue === undefined || maxValue === null || maxValue === "") return 0; const max = Number(maxValue || 0); if (!max || max <= 0) return 100; diff --git a/tests/test_webapp_assets.py b/tests/test_webapp_assets.py index 72a4ae8..c4a3b62 100644 --- a/tests/test_webapp_assets.py +++ b/tests/test_webapp_assets.py @@ -592,7 +592,7 @@ class WebAppAssetTests(unittest.IsolatedAsyncioTestCase): def test_frontend_nginx_proxies_shell_routes_for_dynamic_head(self): nginx_conf = Path("deploy/docker/frontend/nginx.conf").read_text(encoding="utf-8") - marker = "location ~ ^/(?:$|login/password$|home$|install$|trial$|s/[a-f0-9]{32}$" + marker = 'location ~ "^/(?:$|login/password$|home$|install$|trial$|s/[a-f0-9]{32}$' self.assertIn(marker, nginx_conf) start = nginx_conf.index(marker) diff --git a/tests/test_webapp_devices_labels.py b/tests/test_webapp_devices_labels.py index 5a91d0f..b2bba23 100644 --- a/tests/test_webapp_devices_labels.py +++ b/tests/test_webapp_devices_labels.py @@ -6,7 +6,6 @@ from pathlib import Path import pytest - REPO_ROOT = Path(__file__).resolve().parents[1]