chore: align local checks

This commit is contained in:
3252a8
2026-06-07 23:57:06 +03:00
parent a86f5d75e1
commit 2077c27252
6 changed files with 6 additions and 10 deletions
+1
View File
@@ -16,6 +16,7 @@ frontend/node_modules/
docs-site/node_modules/ docs-site/node_modules/
docs-site/.astro/ docs-site/.astro/
docs-site/dist/ docs-site/dist/
docs-site/public/demo/runtime/
docs-site/src/content/docs/ docs-site/src/content/docs/
frontend-nginx-dist/ frontend-nginx-dist/
deploy/compose/docker-compose-dev.yml deploy/compose/docker-compose-dev.yml
+1 -2
View File
@@ -661,8 +661,7 @@ class PaykillaService(HttpClientMixin):
return cached_data return cached_data
if response.status != 200 or not isinstance(response_data, list): if response.status != 200 or not isinstance(response_data, list):
logging.warning( logging.warning(
"Paykilla currency metadata request failed " "Paykilla currency metadata request failed (status=%s, body=%s)",
"(status=%s, body=%s)",
response.status, response.status,
response_data, response_data,
) )
@@ -832,8 +832,7 @@ class SubscriptionLifecycleMixin:
traffic_limit = ( traffic_limit = (
self._traffic_limit_for_period_tariff(bonus_tariff) self._traffic_limit_for_period_tariff(bonus_tariff)
if bonus_tariff if bonus_tariff
else else self.settings.user_traffic_limit_bytes
self.settings.user_traffic_limit_bytes
if apply_main_traffic_limit if apply_main_traffic_limit
else self.settings.trial_traffic_limit_bytes else self.settings.trial_traffic_limit_bytes
) )
@@ -922,8 +921,7 @@ class SubscriptionLifecycleMixin:
traffic_limit_bytes=( traffic_limit_bytes=(
updated_sub_model.traffic_limit_bytes updated_sub_model.traffic_limit_bytes
if bonus_tariff if bonus_tariff
else else self.settings.user_traffic_limit_bytes
self.settings.user_traffic_limit_bytes
if apply_main_traffic_limit and not preserve_tariff_limits if apply_main_traffic_limit and not preserve_tariff_limits
else None else None
), ),
+1 -2
View File
@@ -24,8 +24,7 @@ export function devicesCountLabel(devicesData, t, maxDevicesOverride) {
export function devicesPercent(devicesData, maxDevicesOverride) { export function devicesPercent(devicesData, maxDevicesOverride) {
const current = Number(devicesData?.current_devices ?? devicesData?.devices?.length ?? 0); const current = Number(devicesData?.current_devices ?? devicesData?.devices?.length ?? 0);
const maxValue = const maxValue = maxDevicesOverride !== undefined ? maxDevicesOverride : devicesData?.max_devices;
maxDevicesOverride !== undefined ? maxDevicesOverride : devicesData?.max_devices;
if (maxValue === undefined || maxValue === null || maxValue === "") return 0; if (maxValue === undefined || maxValue === null || maxValue === "") return 0;
const max = Number(maxValue || 0); const max = Number(maxValue || 0);
if (!max || max <= 0) return 100; if (!max || max <= 0) return 100;
+1 -1
View File
@@ -592,7 +592,7 @@ class WebAppAssetTests(unittest.IsolatedAsyncioTestCase):
def test_frontend_nginx_proxies_shell_routes_for_dynamic_head(self): def test_frontend_nginx_proxies_shell_routes_for_dynamic_head(self):
nginx_conf = Path("deploy/docker/frontend/nginx.conf").read_text(encoding="utf-8") 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) self.assertIn(marker, nginx_conf)
start = nginx_conf.index(marker) start = nginx_conf.index(marker)
-1
View File
@@ -6,7 +6,6 @@ from pathlib import Path
import pytest import pytest
REPO_ROOT = Path(__file__).resolve().parents[1] REPO_ROOT = Path(__file__).resolve().parents[1]