Skip to content

Commit

Permalink
ci:CI black and isort (#238)
Browse files Browse the repository at this point in the history
* set settings for flake and isort to be compatible with black

* add linting ci
  • Loading branch information
maikia authored Oct 18, 2022
1 parent dc4fe3c commit 8004ce6
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This is a basic workflow to help you get started with Actions
name: linting-validation

# Controls when the workflow will run
on:
push:
branches:
- main
pull_request:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'

- name: Install dependencies
run: pip install isort black==22.3.0

- name: Run black
run: black --check .

- name: Run isort
run: isort .
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
max-line-length = 88

[isort]
profile = black
skip = __init__.py

0 comments on commit 8004ce6

Please sign in to comment.