style(): small improvements

This commit is contained in:
ITQ
2026-02-24 18:30:01 +03:00
parent 727f42c1f2
commit 1c7753b71e
3 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -206,7 +206,7 @@ format:
script: script:
- cd src/backend - cd src/backend
- uv sync --dev - uv sync --dev
- just format - just format-check
allow_failure: true allow_failure: true
test: test:
+1 -3
View File
@@ -71,9 +71,7 @@ def _validate_channel_config(
raise ValidationError( raise ValidationError(
{"config": "Channel config must be a JSON object."} {"config": "Channel config must be a JSON object."}
) )
for required_field in REQUIRED_CHANNEL_CONFIG_FIELDS.get( for required_field in REQUIRED_CHANNEL_CONFIG_FIELDS.get(channel_type, ()):
channel_type, ()
):
_required_str_config(config, required_field, channel_type) _required_str_config(config, required_field, channel_type)
+11 -5
View File
@@ -14,35 +14,41 @@ help: default
run: run:
@ uv run python manage.py runserver @ uv run python manage.py runserver
[group('style')]
style: style:
just format just format
just lint just lint
just mypy just mypy
[group('test')]
check: check:
just style just style
just test
just test-coverage just test-coverage
# lints codebase using golangci-lint # lints codebase using golangci-lint
[group('lint')] [group('style')]
lint: lint:
@ uv run ruff check . @ uv run ruff check .
# lints and fixes codebase using ruff # lints and fixes codebase using ruff
[group('lint')] [group('style')]
fix: fix:
@ uv run ruff check . --fix @ uv run ruff check . --fix
# formats codebase using ruff # formats codebase using ruff
[group('lint')] [group('style')]
format: format:
@ uv run ruff 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 alias fmt := format
# lints codebase using mypy # lints codebase using mypy
[group('lint')] [group('style')]
mypy: mypy:
@ uv run mypy . @ uv run mypy .