Skip to content

Commit

Permalink
lint: Don't fix Python formattings using ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
def- committed Dec 21, 2023
1 parent f1e9f05 commit cb731b1
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions bin/pyfmt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@ cd "$(dirname "$0")/.."
. misc/shlib/shlib.bash

try bin/pyactivate -m black . "$@"
try bin/pyactivate -m ruff --fix --extend-exclude=misc/dbt-materialize .
try bin/pyactivate -m ruff --target-version=py38 --fix misc/dbt-materialize

args=("--fix")

while [[ $# -gt 0 ]]; do
case $1 in
--check)
# ruff only supports --fix, not --check
args=()
shift
;;
*)
# Ignore all unknown arguments
shift
;;
esac
done

try bin/pyactivate -m ruff "${args[@]}" --extend-exclude=misc/dbt-materialize .
try bin/pyactivate -m ruff --target-version=py38 "${args[@]}" misc/dbt-materialize
try_status_report

0 comments on commit cb731b1

Please sign in to comment.