Run isort import sorter during package build

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
This commit is contained in:
Benjamin Drung 2023-01-30 21:34:24 +01:00
parent 4e27045f49
commit a685368ae9
3 changed files with 8 additions and 0 deletions

1
debian/control vendored
View File

@ -15,6 +15,7 @@ Build-Depends:
dh-python,
distro-info (>= 0.2~),
flake8,
isort <!nocheck>,
lsb-release,
python3-all,
python3-apt,

View File

@ -1,2 +1,6 @@
[tool.black]
line-length = 99
[tool.isort]
line_length = 99
profile = "black"

View File

@ -9,5 +9,8 @@ PYTHON_SCRIPTS=$(grep -l -r '^#! */usr/bin/python3$' .)
echo "Running black..."
black --check --diff . $PYTHON_SCRIPTS
echo "Running isort..."
isort --check-only --diff .
echo "Running flake8..."
flake8 --max-line-length=99 --ignore=E203,W503 . $PYTHON_SCRIPTS