Use ruff check --fix instead of isort.

This commit is contained in:
Felix Fontein 2025-12-25 21:59:22 +01:00
parent 712d920941
commit 39bd985f5e
4 changed files with 15 additions and 9 deletions

View File

@ -6,3 +6,5 @@
2487d1a0bf4f2c79d3ab5a9e7d0f969432bf32a2 2487d1a0bf4f2c79d3ab5a9e7d0f969432bf32a2
# Reformat with black and isort # Reformat with black and isort
d65d37e9e9a78e03a35643704b413121515ee39c d65d37e9e9a78e03a35643704b413121515ee39c
# Reformat with ruff check --fix instead of isort
81a8bcd01f271c955a8ea773467e2d1d2c418aed

View File

@ -1,7 +0,0 @@
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
[isort]
profile=black
lines_after_imports = 2

View File

@ -16,9 +16,14 @@ stable_branches = [ "stable-*" ]
[sessions] [sessions]
[sessions.lint] [sessions.lint]
run_isort = true run_isort = false
isort_config = ".isort.cfg"
run_black = true run_black = true
run_ruff_autofix = true
ruff_autofix_config = "ruff.toml"
ruff_autofix_select = [
"I",
"RUF022",
]
run_ruff_check = true run_ruff_check = true
ruff_check_config = "ruff.toml" ruff_check_config = "ruff.toml"
run_flake8 = true run_flake8 = true

View File

@ -29,3 +29,9 @@ unfixable = []
# Allow unused variables when underscore-prefixed or starting with dummy # Allow unused variables when underscore-prefixed or starting with dummy
dummy-variable-rgx = "^(_|dummy).*$" dummy-variable-rgx = "^(_|dummy).*$"
[lint.isort]
known-third-party = [
"ansible_collections.community.internal_test_tools",
"ansible_collections.community.library_inventory_filtering_v1",
]