diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index fd5bb726..bed730f6 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -8,3 +8,5 @@ aec1826c34051b9e7f8af7950489915b661e320b # Reformat with black another time, this time without Python 2 compatibility 797bd8a6e2a6f4a37a89ecb15ca34ec88b33258d +# Reformat with ruff check --fix instead of isort +d1f3518d51bc3efd6dc1d2166b7b410702bd58d5 diff --git a/.isort.cfg b/.isort.cfg deleted file mode 100644 index bf8cf046..00000000 --- a/.isort.cfg +++ /dev/null @@ -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 diff --git a/antsibull-nox.toml b/antsibull-nox.toml index 572b42fc..694467a4 100644 --- a/antsibull-nox.toml +++ b/antsibull-nox.toml @@ -13,9 +13,14 @@ stable_branches = [ "stable-*" ] [sessions] [sessions.lint] -run_isort = true -isort_config = ".isort.cfg" +run_isort = false run_black = true +run_ruff_autofix = true +ruff_autofix_config = "ruff.toml" +ruff_autofix_select = [ + "I", + "RUF022", +] run_ruff_check = true ruff_check_config = "ruff.toml" run_flake8 = true diff --git a/ruff.toml b/ruff.toml index dca70302..58330a5a 100644 --- a/ruff.toml +++ b/ruff.toml @@ -29,3 +29,8 @@ unfixable = [] # Allow unused variables when underscore-prefixed or starting with dummy dummy-variable-rgx = "^(_|dummy).*$" + +[lint.isort] +known-third-party = [ + "ansible_collections.community.internal_test_tools", +]