From 3dad50ac23cca5cdb5f75dc7b06fe954a88b090a Mon Sep 17 00:00:00 2001 From: mariosasko Date: Fri, 1 Mar 2024 17:50:46 +0100 Subject: [PATCH 1/4] Use tool.ruft.lint to silence deprecation messages --- pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d572ac3ee76..04c79344f39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,15 +3,17 @@ line-length = 119 target_version = ['py37'] [tool.ruff] +line-length = 119 + +[tool.ruff.lint] # Ignored rules: # "E501" -> line length violation # "F821" -> undefined named in type annotation (e.g. Literal["something"]) # "C901" -> `function_name` is too complex ignore = ["E501", "F821", "C901"] select = ["C", "E", "F", "I", "W"] -line-length = 119 -[tool.ruff.isort] +[tool.ruff.lint.isort] lines-after-imports = 2 known-first-party = ["datasets"] From ace039e8dd1f4279ac36b47933224cd815f64c8f Mon Sep 17 00:00:00 2001 From: mariosasko Date: Fri, 1 Mar 2024 17:54:12 +0100 Subject: [PATCH 2/4] Bump ruff to 0.3.0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 45a892c19d6..e7bff3343d7 100644 --- a/setup.py +++ b/setup.py @@ -218,7 +218,7 @@ TESTS_REQUIRE.extend(VISION_REQUIRE) TESTS_REQUIRE.extend(AUDIO_REQUIRE) -QUALITY_REQUIRE = ["ruff>=0.1.5"] +QUALITY_REQUIRE = ["ruff>=0.3.0"] DOCS_REQUIRE = [ # Might need to add doc-builder and some specific deps in the future From 37d4372a10a2d4693f230da8b8535ef4cb5abc19 Mon Sep 17 00:00:00 2001 From: mariosasko Date: Fri, 1 Mar 2024 17:54:48 +0100 Subject: [PATCH 3/4] Update pre-commit config --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d53187601dc..c3751a63a64 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/charliermarsh/ruff-pre-commit # https://github.com/charliermarsh/ruff#usage - rev: 'v0.1.5' + rev: 'v0.3.0' hooks: # Run the linter. - id: ruff From ddc0ec032b3e3feeb0843ec6aac0d64f337f1f06 Mon Sep 17 00:00:00 2001 From: mariosasko Date: Fri, 1 Mar 2024 18:05:02 +0100 Subject: [PATCH 4/4] Remove black section from pyproject.toml --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 04c79344f39..cbfcb3d9c86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,3 @@ -[tool.black] -line-length = 119 -target_version = ['py37'] - [tool.ruff] line-length = 119