ci: add flake8 lint workflow; fix unused imports and f-string issues
Lint / Python (flake8) (push) Failing after 4s
Lint / Python (flake8) (push) Failing after 4s
Adds .gitea/workflows/lint.yml running flake8 with .flake8 config. Removes unused sys/urllib.request imports (F401). Removes f prefix from 52 f-strings that had no placeholders (F541). Auto-fixes trailing whitespace in blank lines (W293) via autopep8. Fixes over-indentation in LXC storage check try block (E117). Config ignores F841 (unused locals) and E501 (long lines). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
[flake8]
|
||||||
|
max-line-length = 120
|
||||||
|
# F841: local variable assigned but never used — many are intentional debug/future-use assignments
|
||||||
|
# E501: line too long — URLs and log messages in monitoring code are exempt
|
||||||
|
extend-ignore = F841, E501
|
||||||
|
exclude = __pycache__, .git
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
name: Lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["**"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["**"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
python-lint:
|
||||||
|
name: Python (flake8)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install flake8
|
||||||
|
run: pip install flake8
|
||||||
|
|
||||||
|
- name: Run flake8
|
||||||
|
run: flake8 .
|
||||||
+286
-272
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user