An open API service indexing awesome lists of open source software.

https://github.com/konstruktoid/action-pylint

A GitHub action that checks Python code using black and ruff
https://github.com/konstruktoid/action-pylint

black checks-python dlint flake8 github-action github-actions github-actions-python hacktoberfest lint python3 python3-safety ruff safety security-tools

Last synced: 7 months ago
JSON representation

A GitHub action that checks Python code using black and ruff

Awesome Lists containing this project

README

          

# Python linting and testing using black and ruff

A GitHub action that checks Python code using
[black](https://github.com/psf/black) and
[ruff](https://github.com/charliermarsh/ruff).

## Github Actions configuration examples

```yaml
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@v4

- name: Python linting
uses: konstruktoid/action-pylint@v1.0.0
```

## Script

```sh
#!/bin/sh

set -euf

export PATH="${PATH}:/root/.local/bin"

black --check --diff --no-color --quiet .
ruff check --select ALL .
```