commit: 2d2e547ee0928c943cbc17753a182974bd5ae09e Author: Oskari Pirhonen <xxc3ncoredxx <AT> gmail <DOT> com> AuthorDate: Wed Mar 29 02:33:58 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Apr 7 09:49:59 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2d2e547e
ci: run black on sourcehut Runs the black portion of the lint tasks on sourcehut builds. Signed-off-by: Oskari Pirhonen <xxc3ncoredxx <AT> gmail.com> Signed-off-by: Sam James <sam <AT> gentoo.org> .builds/lint.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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 <[email protected]> + +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
