Skip to content

Commit

Permalink
automated changes for black formatting (ansible-collections#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
abikouo authored Apr 11, 2023
1 parent ed09047 commit 560e0e3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 6 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit 560e0e3

Please sign in to comment.