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 diff --git a/pyproject.toml b/pyproject.toml index d572ac3ee76..cbfcb3d9c86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,17 +1,15 @@ -[tool.black] +[tool.ruff] line-length = 119 -target_version = ['py37'] -[tool.ruff] +[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"]