From: Zack Cerza Date: Tue, 9 Sep 2025 03:18:55 +0000 (-0600) Subject: Drop flake8 in favor of ruff X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ff1058191d804dbc23b865d726c52abe8eaadccb;p=teuthology.git Drop flake8 in favor of ruff For now, use a very narrow ruleset. We should expand to use more later. Signed-off-by: Zack Cerza --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4fc1b2c3c..7d68e59d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,10 +25,15 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - - name: Install tox - run: pip install tox - - name: Run flake8 - run: tox -e flake8 + - name: Install pipx + run: pip install pipx + - name: Install uv + run: pipx install uv + - name: Run pipx ensurepath + run: pipx ensurepath + - name: Lint + run: uv tool run ruff check + - name: Run unit tests run: tox -e py3 - name: Run docs build diff --git a/pyproject.toml b/pyproject.toml index 2d2a01374..4d7b191eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,6 @@ test = [ "boto>=2.0b4", "boto3", "coverage", - "flake8", "ipy", "mock", "PyJWT", @@ -137,3 +136,6 @@ exclude = [ [tool.setuptools_scm] version_scheme = "python-simplified-semver" + +[tool.ruff] +lint.select = ["F", "E9"] diff --git a/tox.ini b/tox.ini index b6722e16d..09ab4cfa0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = docs, py3, flake8 +envlist = docs, py3 isolated_build = True [testenv] @@ -14,10 +14,6 @@ log_format = %(asctime)s %(levelname)s %(message)s commands = python -m pytest --cov=teuthology --cov-report=term -v {posargs:teuthology scripts} -[testenv:flake8] -deps = flake8 -commands = flake8 --select=F,E9 {posargs:teuthology scripts} - [testenv:docs] changedir = docs extras = docs