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
- Host: GitHub
- URL: https://github.com/konstruktoid/action-pylint
- Owner: konstruktoid
- License: gpl-3.0
- Created: 2020-01-08T11:03:10.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-05-03T09:29:19.000Z (7 months ago)
- Last Synced: 2025-05-03T10:27:05.743Z (7 months ago)
- Topics: black, checks-python, dlint, flake8, github-action, github-actions, github-actions-python, hacktoberfest, lint, python3, python3-safety, ruff, safety, security-tools
- Language: Dockerfile
- Homepage:
- Size: 1020 KB
- Stars: 10
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
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 .
```