From c5f236000bd6be7ba9c14700af545f7f29422e9f Mon Sep 17 00:00:00 2001 From: Thomas M Kehrenberg Date: Thu, 29 Feb 2024 17:15:06 +0100 Subject: [PATCH] Pin ruff --- .github/workflows/ci.yml | 27 +++++++++++++++++---------- poetry.lock | 4 ++-- pyproject.toml | 9 +++++++-- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a224206..c4b642bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,33 +13,40 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: "3.10" - - name: Install ruff + python-version: "3.11" + - name: Install poetry + run: pipx install poetry + - name: Install dependencies run: | - pip install ruff + poetry env use 3.11 + poetry install --no-interaction --no-root --only lint - name: Format with ruff run: | - ruff format --diff . + poetry run ruff format --diff . lint_with_ruff: runs-on: ubuntu-latest + steps: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: "3.10" - - name: Install ruff + python-version: "3.11" + - name: Install poetry + run: pipx install poetry + - name: Install dependencies run: | - pip install ruff + poetry env use 3.11 + poetry install --no-interaction --no-root --only lint - name: Lint with ruff run: | - ruff check --output-format=github . + poetry run ruff check --output-format=github . run_type_checking: needs: diff --git a/poetry.lock b/poetry.lock index c2247fd2..998ea5a7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.1 and should not be changed by hand. [[package]] name = "aiohttp" @@ -3238,4 +3238,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "d9315641cde83b4dfcdabdeb8e6288e4f2f0ba8737e29ad9b11071d921c39d3a" +content-hash = "0db240d14519c4a8a2078b91e59ce42803c85dbceb5d91b719ba7f6836c875f5" diff --git a/pyproject.toml b/pyproject.toml index 36ac4623..0a01cebe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,10 +53,12 @@ torch = "^2.0.1" torchvision = ">=0.15.2" [tool.poetry.group.dev.dependencies] -ruff = "*" types-tqdm = "*" pandas-stubs = "*" -python-type-stubs = {git = "https://github.com/wearepal/python-type-stubs.git", rev = "8d5f608"} +python-type-stubs = { git = "https://github.com/wearepal/python-type-stubs.git", rev = "8d5f608" } + +[tool.poetry.group.lint.dependencies] +ruff = "*" [build-system] requires = ["poetry-core>=1.0.0"] @@ -67,6 +69,9 @@ target-version = "py310" line-length = 100 extend-exclude = ["hydra_plugins"] +[tool.ruff.format] +quote-style = "preserve" + [tool.ruff.lint] select = ["I", "F", "E", "W", "UP"] ignore = [