From 0ebaa35f176a18d0d7950c03e980cac97875c0d5 Mon Sep 17 00:00:00 2001 From: DHANUSH N Date: Thu, 16 Mar 2023 10:12:16 +0530 Subject: [PATCH 1/3] Created pylint.yml --- .github/workflows/pylint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..383e65c --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,23 @@ +name: Pylint + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10"] + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + - name: Analysing the code with pylint + run: | + pylint $(git ls-files '*.py') From ec38efa056cf86acf377fc3d0c9d3fcda1e58dd8 Mon Sep 17 00:00:00 2001 From: DHANUSH N Date: Thu, 16 Mar 2023 10:55:41 +0530 Subject: [PATCH 2/3] using black to auto format code --- .github/workflows/{pylint.yml => black.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{pylint.yml => black.yml} (88%) diff --git a/.github/workflows/pylint.yml b/.github/workflows/black.yml similarity index 88% rename from .github/workflows/pylint.yml rename to .github/workflows/black.yml index 383e65c..9e3337d 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/black.yml @@ -17,7 +17,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint + pip install black - name: Analysing the code with pylint run: | - pylint $(git ls-files '*.py') + black $(git ls-files '*.py') From d05a9f020ce599594fd3c98a68803fd717df6d0e Mon Sep 17 00:00:00 2001 From: DHANUSH N Date: Thu, 16 Mar 2023 10:57:59 +0530 Subject: [PATCH 3/3] renamed the workflow --- .github/workflows/black.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index 9e3337d..4a0408c 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -1,4 +1,4 @@ -name: Pylint +name: Black on: [push] @@ -18,6 +18,6 @@ jobs: run: | python -m pip install --upgrade pip pip install black - - name: Analysing the code with pylint + - name: Formating the code with black run: | black $(git ls-files '*.py')