From 8004ce62eb9122dd9be589d9b02b4840d501b671 Mon Sep 17 00:00:00 2001 From: Maria Telenczuk Date: Tue, 18 Oct 2022 15:18:20 +0200 Subject: [PATCH] ci:CI black and isort (#238) * set settings for flake and isort to be compatible with black * add linting ci --- .github/workflows/linting.yml | 31 +++++++++++++++++++++++++++++++ setup.cfg | 6 ++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/linting.yml create mode 100644 setup.cfg diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 000000000..da89525ee --- /dev/null +++ b/.github/workflows/linting.yml @@ -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 . \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..eed08c28f --- /dev/null +++ b/setup.cfg @@ -0,0 +1,6 @@ +[flake8] +max-line-length = 88 + +[isort] +profile = black +skip = __init__.py \ No newline at end of file