From 560e0e3d40ff6145578d3f7b641927ec54439e2c Mon Sep 17 00:00:00 2001 From: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> Date: Tue, 11 Apr 2023 14:30:36 +0200 Subject: [PATCH] automated changes for black formatting (#611) --- .github/workflows/black.yml | 17 +++++++++++++++++ tox.ini | 12 ++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/black.yml diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml new file mode 100644 index 00000000..e4a6fd3c --- /dev/null +++ b/.github/workflows/black.yml @@ -0,0 +1,17 @@ +--- +name: black + +concurrency: + group: '${{ github.workflow }} @ ${{ github.sha }}' + cancel-in-progress: true + +on: + push: + branches: + - main + - 'stable-*' + pull_request_target: + +jobs: + format: + uses: abikouo/github_actions/.github/workflows/black.yml@automate_changes_a diff --git a/tox.ini b/tox.ini index ab7f890e..c307fbd1 100644 --- a/tox.ini +++ b/tox.ini @@ -19,27 +19,27 @@ commands= deps = git+https://github.com/ansible-network/collection_prep commands = collection_prep_add_docs -p . -[testenv:black] +[testenv:black_check] deps = black >= 22.0, < 23.0 commands = black -v --check --diff {toxinidir}/plugins {toxinidir}/tests -[testenv:black_format] +[testenv:black] deps = - {[testenv:black]deps} + {[testenv:black_check]deps} commands = - black -v {posargs} + black -v {posargs:{toxinidir}/plugins {toxinidir}/tests} [testenv:linters] deps = yamllint flake8 - {[testenv:black]deps} + {[testenv:black_check]deps} commands = - {[testenv:black]commands} + {[testenv:black_check]commands} yamllint -s {toxinidir} flake8 {toxinidir}