Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

Python quality and format checker

Actions
Python linting and format checking using black ruff
v0.4.0
Star (10)

Python linting and testing using black and ruff

A GitHub action that checks Python code using black and ruff.

Github Actions configuration examples

on: [push, pull_request]
name: Python Linting

permissions:
  contents: read

jobs:
  PythonLinting:
    name: Python linting
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

      - name: Python linting
        uses: konstruktoid/action-pylint@v0.2.2

Script

#!/bin/sh

set -euf

black --check --diff --no-color --quiet .
ruff check --select ALL --ignore ANN --ignore D --ignore INP --ignore PTH --ignore T20 .

Python quality and format checker 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

Python linting and format checking using black ruff
v0.4.0

Python quality and format checker 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.