From c6e9454afa933f711741919c6af0c87d401c9eca Mon Sep 17 00:00:00 2001 From: Bruno Ribeiro <59573315+brunus-reberes@users.noreply.github.com> Date: Thu, 20 Apr 2023 14:44:01 +0100 Subject: [PATCH] ci: Update and rename pylint.yml to code_lint_format.yml Signed-off-by: Bruno Ribeiro <59573315+brunus-reberes@users.noreply.github.com> --- .../workflows/{pylint.yml => code_lint_format.yml} | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) rename .github/workflows/{pylint.yml => code_lint_format.yml} (52%) diff --git a/.github/workflows/pylint.yml b/.github/workflows/code_lint_format.yml similarity index 52% rename from .github/workflows/pylint.yml rename to .github/workflows/code_lint_format.yml index 383e65c..ccc2933 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/code_lint_format.yml @@ -1,13 +1,13 @@ -name: Pylint +name: Code lint and formatter -on: [push] +on: workflow_dispatch jobs: build: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} @@ -17,7 +17,12 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint + pip install pylint autoflake isort black + - name: Python Linter autoflake, isort, black + uses: jiwidi/python-lint-action@v1 - name: Analysing the code with pylint run: | + autoflake --remove-all-unused-imports --remove-unused-variables --expand-star-imports --ignore-init-module-imports -ri . + isort --profile black . + black . pylint $(git ls-files '*.py')