Skip to content

Python Black20 Check

Actions
Customisable GitHub action to use black to check Python code in your repository
22.3.0
Latest
Star (0)

Tags

 (1)

python-black-check

A customisable GitHub action to check the style of Python code with black.

Inputs

You can use inputs to alter how black will check your code.

Path (optional)

This tells black where to look for files to check.

Default: ., i.e. looks for files in the whole repository.

Line-length (optional)

This tells black how long each line of Python code can be.

Default: 81, which is different from black's default of 88.

Include (optional)

This tells black which files we should verify the format of.

Default: \.pyi?$, which matches black's default value.

Exclude (optional)

This tells black which files we should ignore.

Default: /(\.direnv|\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|\.svn|_build|buck-out|build|dist)/, which matches black's default value.

Example usage

Include this in your .github/workflows/main.yaml:

uses: ORTHOIN3D/python-black20-check@20.8b1

or, if you want to override any of the defaults,

uses: RojerGS/python-black-check@master
with:
  line-length: '81'
  path: '.'
  include: 'apps'
  exclude: '(/*.html|/*.mo|/*.po|/*.png|/*.rst)'

Python Black20 Check is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Customisable GitHub action to use black to check Python code in your repository
22.3.0
Latest

Tags

 (1)

Python Black20 Check is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.