summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/unused-imports.yml33
1 files changed, 12 insertions, 21 deletions
diff --git a/.github/workflows/unused-imports.yml b/.github/workflows/unused-imports.yml
index 83098ddf6..d6e820ae6 100644
--- a/.github/workflows/unused-imports.yml
+++ b/.github/workflows/unused-imports.yml
@@ -4,26 +4,17 @@ on:
types: [opened, reopened, ready_for_review, locked]
jobs:
- build:
+ Check-Unused-Imports:
runs-on: ubuntu-latest
- strategy:
- matrix:
- python-version: ["3.11"]
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: |
- tmp=$(git ls-files *.py | xargs pylint | grep W0611 | wc -l)
- if [[ $tmp -gt 0 ]]; then
- echo "Found $tmp occurrence of unused Python import statements!"
- exit 1
- fi
- exit 0
+ - uses: actions/checkout@v3
+ - name: Set up Python
+ uses: actions/setup-python@v3
+ with:
+ python-version: 3.11
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install pylint
+ - name: Analysing the code with pylint
+ run: make unused-imports