Skip to content

Commit

Permalink
Bring back flake8 for python 3.6 (#4394)
Browse files Browse the repository at this point in the history
Ruff is incompatible with python 3.6. Since we still support 3.6,
bring back the option to run flake8 from the Makefile.

Also bump ruff version to bring flake8 parity.

Fixes GH-4339
  • Loading branch information
TheRealFalcon authored Sep 1, 2023
1 parent 60b50dd commit 40c9fe4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tools/run-lint
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

# This file runs flake8 for compatibility's sake. As soon as we move off python 3.6, this should be changed to use ruff.

CR="
"
pycheck_dirs=( "cloudinit/" "tests/" "tools/" "setup.py" )
Expand All @@ -11,7 +13,7 @@ else
files=( "$@" )
fi

cmd=( "python3" -m "ruff" "${files[@]}" )
cmd=( "python3" -m "flake8" "${files[@]}" )

echo "Running: " "${cmd[@]}" 1>&2
exec "${cmd[@]}"
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ isort==5.10.1
mypy==0.950
pylint==2.13.9
pytest==7.0.1
ruff==0.0.282
ruff==0.0.285
types-jsonschema==4.4.2
types-oauthlib==3.1.6
types-passlib==1.7.7.12
Expand Down

0 comments on commit 40c9fe4

Please sign in to comment.