mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-06 13:27:50 +00:00
chore: Only run autopep8 if python files changed, b=no-bug, c=workflows
This commit is contained in:
7
.github/workflows/code-linter.yml
vendored
7
.github/workflows/code-linter.yml
vendored
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user