Skip to content

T6199: spring cleaning - drop unused Python imports (backport #3240) #2

T6199: spring cleaning - drop unused Python imports (backport #3240)

T6199: spring cleaning - drop unused Python imports (backport #3240) #2

Workflow file for this run

name: Pylint
on:
pull_request_target:
types: [opened, reopened, ready_for_review, locked]
jobs:
build:
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