style: format code

This commit is contained in:
2026-06-12 00:16:15 +03:00
parent 91e2c9d123
commit f368e6717c
28 changed files with 121 additions and 166 deletions

8
scripts/format Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
cd "$(dirname $(dirname "$0"))" || exit
TARGET="gallery"
poetry run isort $TARGET
poetry run black $TARGET -q

View File

@@ -2,4 +2,8 @@
set -e
cd "$(dirname $(dirname "$0"))" || exit
poetry run pylint gallery
TARGET="gallery"
poetry run pylint $TARGET
poetry run isort $TARGET --check-only
poetry run black $TARGET -q --check --diff

15
scripts/setup Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
cd "$(dirname $(dirname "$0"))" || exit
PYTHON_VERSION=3.12
poetry env use ${PYTHON_VERSION}
poetry install
cd static || exit
if [[ -f $HOME/.nvm/nvm.sh ]]; then
source "$HOME/.nvm/nvm.sh"
nvm use
fi
npm ci