diff options
author | Oskari Pirhonen <xxc3ncoredxx@gmail.com> | 2023-03-28 21:33:58 -0500 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-04-07 10:49:59 +0100 |
commit | 2d2e547ee0928c943cbc17753a182974bd5ae09e (patch) | |
tree | 3a37cad6ccc66d0e840cdaf9f841c60a3d82b007 /.builds | |
parent | dbapi: Catch invalid binpkg error during pkgmove (diff) | |
download | portage-2d2e547ee0928c943cbc17753a182974bd5ae09e.tar.gz portage-2d2e547ee0928c943cbc17753a182974bd5ae09e.tar.bz2 portage-2d2e547ee0928c943cbc17753a182974bd5ae09e.zip |
ci: run black on sourcehut
Runs the black portion of the lint tasks on sourcehut builds.
Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to '.builds')
-rw-r--r-- | .builds/lint.yml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/.builds/lint.yml b/.builds/lint.yml new file mode 100644 index 000000000..a294a3ad6 --- /dev/null +++ b/.builds/lint.yml @@ -0,0 +1,20 @@ +# Maintainer: Oskari Pirhonen <xxc3ncoredxx@gmail.com> + +image: ubuntu/lts +shell: true +tasks: + - setup-lint-env: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends python-is-python3 python3-venv + python -m venv .venv + source .venv/bin/activate + pip install --upgrade pip + pip install black + + - black: | + source .venv/bin/activate + cd portage + STRAGGLERS="$(find bin runtests -type f -not -name '*.py' -not -name '*.sh' | \ + xargs grep -l '#!/usr/bin/env python' | \ + tr '\n' ' ')" + black --check --diff --color . $STRAGGLERS |