From 40c9fe4f6b5cdc300aa3bb675c379dfe12c09e75 Mon Sep 17 00:00:00 2001 From: James Falcon Date: Fri, 1 Sep 2023 14:37:35 -0500 Subject: [PATCH] Bring back flake8 for python 3.6 (#4394) 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 --- tools/run-lint | 4 +++- tox.ini | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/run-lint b/tools/run-lint index 445e985312c..5dc338f2a3a 100755 --- a/tools/run-lint +++ b/tools/run-lint @@ -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" ) @@ -11,7 +13,7 @@ else files=( "$@" ) fi -cmd=( "python3" -m "ruff" "${files[@]}" ) +cmd=( "python3" -m "flake8" "${files[@]}" ) echo "Running: " "${cmd[@]}" 1>&2 exec "${cmd[@]}" diff --git a/tox.ini b/tox.ini index c1c31886c81..5f01a9a8f6d 100644 --- a/tox.ini +++ b/tox.ini @@ -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