Skip to content

Commit 0acb273

Browse files
authored
Silence ruff deprecation messages (#6707)
* Use tool.ruft.lint to silence deprecation messages * Bump ruff to 0.3.0 * Update pre-commit config * Remove black section from pyproject.toml
1 parent cb33582 commit 0acb273

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/charliermarsh/ruff-pre-commit # https://github.com/charliermarsh/ruff#usage
3-
rev: 'v0.1.5'
3+
rev: 'v0.3.0'
44
hooks:
55
# Run the linter.
66
- id: ruff

pyproject.toml

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
[tool.black]
1+
[tool.ruff]
22
line-length = 119
3-
target_version = ['py37']
43

5-
[tool.ruff]
4+
[tool.ruff.lint]
65
# Ignored rules:
76
# "E501" -> line length violation
87
# "F821" -> undefined named in type annotation (e.g. Literal["something"])
98
# "C901" -> `function_name` is too complex
109
ignore = ["E501", "F821", "C901"]
1110
select = ["C", "E", "F", "I", "W"]
12-
line-length = 119
1311

14-
[tool.ruff.isort]
12+
[tool.ruff.lint.isort]
1513
lines-after-imports = 2
1614
known-first-party = ["datasets"]
1715

0 commit comments

Comments
 (0)