diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5cad9b90..45e733bc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: - - id: end-of-file-fixer - id: trailing-whitespace exclude: test/.*\.py - id: check-yaml @@ -19,14 +18,12 @@ repos: - id: check-case-conflict - id: check-added-large-files - id: detect-private-key - - id: forbid-new-submodules - id: pretty-format-json exclude: demo.ipynb args: ['--autofix', '--no-sort-keys', '--indent=4'] - id: end-of-file-fixer - id: mixed-line-ending - - repo: https://github.com/PyCQA/bandit rev: '1.7.9' hooks: @@ -34,16 +31,6 @@ repos: args: ["-c", "pyproject.toml"] additional_dependencies: ["bandit[toml]"] - - repo: https://github.com/pycqa/isort - rev: 5.13.2 - hooks: - - id: isort - name: isort (python) - - id: isort - name: isort (pyi) - types: [pyi] - - - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.6.1 hooks: diff --git a/pyproject.toml b/pyproject.toml index f0ff6d85..0c281c04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,9 +90,6 @@ mkdocs-jupyter = "^0.24.3" mkdocs-git-committers-plugin-2 = "^2.2.3" mkdocs-git-revision-date-localized-plugin = "^1.2.4" -[tool.isort] -line_length = 88 -profile = "black" [tool.bandit] target = ["test", "supervision"] @@ -157,7 +154,7 @@ indent-width = 4 [tool.ruff.lint] # Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default. -select = ["E", "F"] +select = ["E", "F", "I", "A", "Q", "W"] ignore = [] # Allow autofix for all enabled rules (when `--fix`) is provided. fixable = [ @@ -226,6 +223,10 @@ convention = "google" # Flag errors (`C901`) whenever the complexity level exceeds 5. max-complexity = 20 +[tool.ruff.lint.isort] +order-by-type = true +no-sections = false + [tool.ruff.format] # Like Black, use double quotes for strings. quote-style = "double"