From 1c7753b71e749237569810f396037b9c5a26a7ee Mon Sep 17 00:00:00 2001 From: ITQ Date: Tue, 24 Feb 2026 18:30:01 +0300 Subject: [PATCH] style(): small improvements --- .gitlab-ci.yml | 2 +- src/backend/apps/notifications/services.py | 4 +--- src/backend/justfile | 16 +++++++++++----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d89bdc6..b3d5642 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -206,7 +206,7 @@ format: script: - cd src/backend - uv sync --dev - - just format + - just format-check allow_failure: true test: diff --git a/src/backend/apps/notifications/services.py b/src/backend/apps/notifications/services.py index a71dd84..15ef463 100644 --- a/src/backend/apps/notifications/services.py +++ b/src/backend/apps/notifications/services.py @@ -71,9 +71,7 @@ def _validate_channel_config( raise ValidationError( {"config": "Channel config must be a JSON object."} ) - for required_field in REQUIRED_CHANNEL_CONFIG_FIELDS.get( - channel_type, () - ): + for required_field in REQUIRED_CHANNEL_CONFIG_FIELDS.get(channel_type, ()): _required_str_config(config, required_field, channel_type) diff --git a/src/backend/justfile b/src/backend/justfile index f50e27a..1f70707 100644 --- a/src/backend/justfile +++ b/src/backend/justfile @@ -14,35 +14,41 @@ help: default run: @ uv run python manage.py runserver +[group('style')] style: just format just lint just mypy +[group('test')] check: just style - just test just test-coverage # lints codebase using golangci-lint -[group('lint')] +[group('style')] lint: @ uv run ruff check . # lints and fixes codebase using ruff -[group('lint')] +[group('style')] fix: @ uv run ruff check . --fix # formats codebase using ruff -[group('lint')] +[group('style')] format: @ uv run ruff format . +# checks correct formatting of the codebase using ruff +[group('style')] +format-check: + @ uv run ruff format . --check + alias fmt := format # lints codebase using mypy -[group('lint')] +[group('style')] mypy: @ uv run mypy .