Hanno Böck commited on 2026-02-04 12:23:10
Zeige 2 geänderte Dateien mit 10 Einfügungen und 5 Löschungen.
| ... | ... |
@@ -1,5 +1,5 @@ |
| 1 | 1 |
# SPDX-License-Identifier: 0BSD |
| 2 |
-# last update: 2026-01-07 |
|
| 2 |
+# last update: 2026-02-04 |
|
| 3 | 3 |
# https://github.com/hannob/codingstyle |
| 4 | 4 |
--- |
| 5 | 5 |
name: runpyci |
| ... | ... |
@@ -22,7 +22,7 @@ jobs: |
| 22 | 22 |
- name: Install dependencies and linters |
| 23 | 23 |
run: | |
| 24 | 24 |
[ -e requirements.txt ] && pip install -r requirements.txt |
| 25 |
- pip install pycodestyle pyupgrade pyflakes dlint pylint ruff |
|
| 25 |
+ pip install dlint pycodestyle pyflakes pylint pyproject pyupgrade ruff |
|
| 26 | 26 |
- name: Run tests |
| 27 | 27 |
env: |
| 28 | 28 |
RUN_ONLINETESTS: 1 |
| ... | ... |
@@ -1,24 +1,29 @@ |
| 1 | 1 |
#!/bin/bash |
| 2 | 2 |
# SPDX-License-Identifier: 0BSD |
| 3 |
-# last update: 2025-11-24 |
|
| 3 |
+# last update: 2026-02-04 |
|
| 4 | 4 |
# https://github.com/hannob/codingstyle |
| 5 | 5 |
set -euo pipefail |
| 6 | 6 |
|
| 7 | 7 |
PYLINTIG="consider-using-with,design,fixme,invalid-name,missing-docstring,modified-iterating-list,no-member,possibly-used-before-assignment,protected-access,too-many-lines,unused-argument,broad-exception-caught,c-extension-no-member,duplicate-code,global-statement,global-variable-not-assigned,import-error,import-outside-toplevel,inconsistent-return-statements,redefined-outer-name,unspecified-encoding" |
| 8 |
-RUFFIG="ANN,C90,D,FIX001,FIX002,ICN001,PLR0911,PLR0912,PLR0913,PLR0915,PTH,S314,S501,S603,SLF001,T201,TD002,TD003,B008,BLE001,COM812,FBT002,I001,N802,N806,PERF203,PERF401,PLC0415,PLR2004,PLW0602,PLW0603,PT009,RET505,RUF100,S202,S310,S607,S608,SIM102,SIM105,SIM108,SIM113,SIM114,SIM115,TD001,TD004,TRY300" |
|
| 8 |
+RUFFIG="ANN,C90,D,FIX001,FIX002,ICN001,PLR0911,PLR0912,PLR0913,PLR0915,PTH,RUF102,S314,S501,S603,SLF001,T201,TD002,TD003,B008,BLE001,COM812,FBT002,I001,N802,N806,PERF203,PERF401,PLC0415,PLR2004,PLW0602,PLW0603,PT009,RET505,RUF100,S202,S310,S607,S608,SIM102,SIM105,SIM108,SIM113,SIM114,SIM115,TD001,TD004,TRY300" |
|
| 9 | 9 |
|
| 10 | 10 |
pyfind=$(find -name \*.py) |
| 11 | 11 |
pygrep=$(grep -rl --exclude-dir=.ruff_cache '^#!/usr/bin/python\|^#!/usr/bin/env python' . || true) |
| 12 | 12 |
pyfiles=$(echo "$pyfind" "$pygrep" | sort -u) |
| 13 | 13 |
|
| 14 | 14 |
pycodestyle --max-line-length=100 --ignore=W503,E203 $pyfiles |
| 15 |
-pyupgrade --py313-plus $pyfiles |
|
| 15 |
+pyupgrade --py314-plus $pyfiles |
|
| 16 | 16 |
pyflakes $pyfiles |
| 17 | 17 |
flake8 --select=DUO --ignore=DUO107,DUO123,DUO131 $pyfiles |
| 18 | 18 |
isort --line-length=100 --diff --check-only . |
| 19 | 19 |
pylint --disable=$PYLINTIG $pyfiles |
| 20 | 20 |
ruff check --line-length=100 --select=ALL --ignore=$RUFFIG $pyfiles |
| 21 | 21 |
|
| 22 |
+if [ -e pyproject.toml ]; then |
|
| 23 |
+ pyproject check |
|
| 24 |
+ pyproject format --check |
|
| 25 |
+fi |
|
| 26 |
+ |
|
| 22 | 27 |
if [ -d tests ]; then |
| 23 | 28 |
python -m unittest -v |
| 24 | 29 |
fi |
| 25 | 30 |