ci: 👷 retire isort and enable ruff's isort

Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
This commit is contained in:
Onuralp SEZER 2024-08-22 23:27:33 +03:00
parent ed253fef99
commit b65d2cc73f
No known key found for this signature in database
GPG Key ID: CF0835DFDF14CA38
2 changed files with 5 additions and 17 deletions

View File

@ -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:

View File

@ -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"