mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-14 19:36:24 +00:00
c32c07eaa6
* Remove unused imports in python files * Add black and isort dependencies Also added pyproject.toml for isort config, but later can be used to configure various other python tools * Add flake8 in requirements.txt * Add py-linter workflow
33 lines
651 B
YAML
33 lines
651 B
YAML
name: Python Lint
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '**.py'
|
|
|
|
jobs:
|
|
run-linters:
|
|
name: Run linters
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
cache: pip
|
|
- run: pip install black==22.8.0 flake8==5.0.4 isort==5.10.1
|
|
- name: Run linters
|
|
uses: wearerequired/lint-action@v2
|
|
with:
|
|
auto_fix: true
|
|
black: true
|
|
flake8: true
|
|
# Flake8 doesn't support auto-fixing
|
|
flake8_auto_fix: false
|