diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index d1c27b7d..4beaddbe 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -1,6 +1,6 @@ name: Pylint Check -on: [push, pull_request] +on: [push] jobs: lint: @@ -38,11 +38,7 @@ jobs: - name: Run Pylint run: | - PYTHON_FILES=$(find ./apps/data_handler -name "*.py") - if [ -n "$PYTHON_FILES" ]; then - echo "Files to lint: $PYTHON_FILES" - python -m pylint $PYTHON_FILES --disable=all --enable=C0114,C0115,C0116,C0301 --max-line-length=150 - else - echo "No Python files found in apps/data_handler/" - exit 1 + files=$(git ls-files 'data_handler/*.py') + if [ -n "$files" ]; then + pylint $files --disable=all --enable=C0114,C0115,C0116,C0301 fi \ No newline at end of file