diff --git a/.github/workflows/tox.yaml b/.github/workflows/tox.yaml index 434878dbd5..dd60a5c926 100644 --- a/.github/workflows/tox.yaml +++ b/.github/workflows/tox.yaml @@ -25,7 +25,7 @@ jobs: echo "::group::Begin snap install" echo "Installing snaps in the background while running apt and pip..." sudo snap install --no-wait --classic pyright --revision 735 # version 1.1.344 - sudo snap install --no-wait shellcheck + sudo snap install --no-wait shellcheck ruff echo "::endgroup::" echo "::group::apt-get update" sudo apt-get update diff --git a/requirements-devel.txt b/requirements-devel.txt index 50644bf4d9..9a0c0e8be7 100644 --- a/requirements-devel.txt +++ b/requirements-devel.txt @@ -95,7 +95,6 @@ raven==6.10.0 requests==2.31.0 requests-toolbelt==1.0.0 requests-unixsocket==0.3.0 -ruff==0.1.11 SecretStorage==3.3.3 simplejson==3.19.2 six==1.16.0 diff --git a/setup.py b/setup.py index 6490822a2f..ecab123a74 100755 --- a/setup.py +++ b/setup.py @@ -82,7 +82,6 @@ def recursive_data_files(directory, install_directory): "pytest-cov", "pytest-mock", "pytest-subprocess", - "ruff", "tox>=4.5", "types-PyYAML", "types-requests", diff --git a/tools/environment-setup-local.sh b/tools/environment-setup-local.sh index 0b88eed6d4..881346a128 100755 --- a/tools/environment-setup-local.sh +++ b/tools/environment-setup-local.sh @@ -50,5 +50,8 @@ sudo snap install shellcheck # Install pyright for static tests. sudo snap install pyright --classic +# Install ruff for linting +sudo snap install ruff + echo "Virtual environment may be activated by running:" echo "source ${SNAPCRAFT_VIRTUAL_ENV_DIR}/bin/activate" diff --git a/tox.ini b/tox.ini index e0a4d9bf89..2bb58d93bc 100644 --- a/tox.ini +++ b/tox.ini @@ -93,6 +93,7 @@ base = testenv, lint labels = lint allowlist_externals = shellcheck: bash, xargs + ruff: ruff commands_pre = shellcheck: bash -c '{[shellcheck]find} | {[shellcheck]filter} > {env_tmp_dir}/shellcheck_files' shellcheck: bash -c '{[shellcheck]find} | {[shellcheck]spread_filter} > {env_tmp_dir}/spread_shellcheck_files' @@ -143,6 +144,8 @@ commands = description = Automatically format source code base = testenv, lint labels = format +allowlist_externals: + ruff: ruff commands = black: black {tty:--color} {posargs} . ruff: ruff --fix --respect-gitignore setup.py snapcraft tests tools