python/ruff

This commit is contained in:
Marc Beninca 2025-01-31 18:42:58 +01:00
parent 5a89616f5c
commit e4178bda5d
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 18 additions and 2 deletions

View file

@ -3,8 +3,11 @@ rwx_python_lint() {
local path="${1}" local path="${1}"
# check pydoc # check pydoc
rwx_log "pydoc" rwx_log "pydoc"
pydoclint "${path}" rwx_pydoclint "${path}"
# check typing # check typing
rwx_log "mypy" rwx_log "mypy"
mypy "${path}" rwx_mypy "${path}"
# ruff
rwx_log "ruff"
rwx_ruff "${path}"
} }

13
sh/lint/ruff.sh Normal file
View file

@ -0,0 +1,13 @@
rwx_ruff() {
local path="${1}"
rwx_ruff_format \
"${path}"
}
rwx_ruff_format() {
local path="${1}"
ruff format \
--diff \
--line-length 80 \
"${path}"
}