Debian Codegraph @

scripts/lint

raw
1 #!/bin/sh -e
2
3 export PREFIX=""
4 if [ -d 'venv' ] ; then
5 export PREFIX="venv/bin/"
6 fi
7 export SOURCE_FILES="httpcore tests"
8
9 set -x
10
11 ${PREFIX}ruff check --fix $SOURCE_FILES
12 ${PREFIX}ruff format $SOURCE_FILES
13
14 # Run unasync last because its `--check` mode is not aware of code formatters.
15 # (This means sync code isn't prettified, and that's mostly okay.)
16 ${PREFIX}python scripts/unasync.py