chore: Only run autopep8 if python files changed, b=no-bug, c=workflows

This commit is contained in:
Mr. M
2025-10-12 11:29:04 +02:00
parent ac5f43c15b
commit 6a6fd4be1c
2 changed files with 6 additions and 3 deletions

View File

@@ -27,8 +27,11 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: Setup autopep8
run: sudo apt install python3-autopep8
- name: Setup and run autopep8
if: ${{ contains(join(github.event.commits.*.modified, ' '), '.py') || contains(join(github.event.commits.*.added, ' '), '.py') || contains(join(github.event.commits.*.removed, ' '), '.py') }}
run: |
sudo apt install python3-autopep8
autopep8 --diff scripts/ src/
- name: Install dependencies
run: npm ci

View File

@@ -21,7 +21,7 @@
"update-ff:rc": "python3 scripts/update_ff.py --rc",
"update-ff:l10n": "python3 scripts/update_ff.py --just-l10n",
"pretty": "prettier . --write --cache && autopep8 -r --in-place scripts/ src/",
"lint": "npx eslint src/ && prettier . --check && autopep8 --diff scripts/ src/",
"lint": "npx eslint src/ && prettier . --check --cache",
"lint:fix": "npm run pretty && npx eslint src/ --fix",
"prepare": "husky",
"reset-ff": "surfer reset",