From 30bab7485d1e83087759fe9ebb2c851b257c28cb Mon Sep 17 00:00:00 2001 From: Florian Maas Date: Thu, 18 Jul 2024 12:20:54 +0200 Subject: [PATCH] chore: pin `ruff` and `mypy` versions in the `lint` stage in the CI pipeline (#2679) Currently, `ruff` and `mypy` have their latest versions installed in the CI pipeline, while locally they are fixed to a specific version. This can cause issues, see https://github.com/delta-io/delta-rs/issues/2678. This PR proposes to fix them to their specific version in the pipeline. The alternative I could think of was installing the virtual environment with `make develop`, but that takes between 4 and 5 minutes, which might be considered a bit too long to wait on linting results. This PR will have conflicts with https://github.com/delta-io/delta-rs/pull/2674, so I'll need to rebase one of these PR's once the other is merged. # Related Issue(s) - closes [#106](https://github.com/delta-io/delta-rs/issues/2678) --- .github/workflows/python_build.yml | 4 ++-- python/pyproject.toml | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python_build.yml b/.github/workflows/python_build.yml index bc2f20cc9a..ce4a58c844 100644 --- a/.github/workflows/python_build.yml +++ b/.github/workflows/python_build.yml @@ -18,11 +18,11 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.10" - name: Check Python run: | - pip install ruff black mypy types-dataclasses typing-extensions + pip install ruff==0.5.2 mypy==1.10.1 types-dataclasses typing-extensions make check-python - name: Install minimal stable with clippy and rustfmt diff --git a/python/pyproject.toml b/python/pyproject.toml index c02b341dba..6f6291435f 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -28,8 +28,6 @@ pandas = [ ] devel = [ "azure-storage-blob==12.20.0", - "mypy~=1.8.0", - "ruff~=0.5.2", "packaging>=20", "pytest", "pytest-mock", @@ -39,7 +37,10 @@ devel = [ "sphinx-rtd-theme", "toml", "wheel", - "pytest-benchmark" + "pytest-benchmark", + # keep ruff and mypy versions in sync with .github/workflows/python_build.yml + "mypy==1.10.1", + "ruff==0.5.2" ] pyspark = [ "pyspark",