diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e6720e7b1..076412235 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.4 + rev: v0.1.15 hooks: - id: ruff - id: ruff-format diff --git a/.vscode/settings.json b/.vscode/settings.json index f8611a6fa..87516d437 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,7 +10,7 @@ "editor.formatOnSave": true, "editor.defaultFormatter": "charliermarsh.ruff", "editor.codeActionsOnSave": { - "source.organizeImports": true + "source.organizeImports": "explicit" }, }, "editor.formatOnSave": true, diff --git a/pyproject.toml b/pyproject.toml index b621d7bdd..c553b3988 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,9 +93,23 @@ select = [ "UP", # pyupgrade "B", # flake8-bugbear # "SIM",# flake8-simplify - "I", # isort + "I", # isort + "PL", # pylint +] +ignore = [ + "E501", # line-too-long + "E713", # not-in-test + "E714", # not-is-test + "E741", # ambiguous-variable-name + "PLR0911", # too-many-return-statements + "PLR0912", # too-many-branches + "PLR0913", # too-many-arguments + "PLR0915", # too-many-statements + "PLR2004", # magic-value-comparison + "PLR5501", # collapsible-else-if + "PLW0603", # global-statement + "PLW2901", # redefined-loop-name ] -ignore = ["E501", "E713", "E714", "E741"] [tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401", "F403"] diff --git a/requirements-dev.txt b/requirements-dev.txt index ad5b14f2a..68dceb464 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -ruff == 0.1.4 +ruff == 0.1.15 pytest pytest-cov[toml] pytest-xdist