diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index cd4bdfee65..1dc9ab7d71 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -7,3 +7,6 @@ d032de3b16eed11ea3a31cd3d96d78f7c46a2ee0 e8f965fbf8154ea177c6622da149f2ae8533bd3c e938ca5f20651abc160ee6aba10014013d04dcc1 eaa5e07b2866e05b6c7b5628ca92e9cb1142d008 + +# Code reformatting +d80f0a1dba05ce7da41e64afc275335b7154708a diff --git a/antsibull-nox.toml b/antsibull-nox.toml index 7446748d83..dbb5985e1d 100644 --- a/antsibull-nox.toml +++ b/antsibull-nox.toml @@ -24,6 +24,8 @@ run_isort = false run_black = false run_ruff_check = true ruff_check_config = "ruff.toml" +run_ruff_format = true +ruff_format_config = "ruff.toml" run_flake8 = false run_pylint = false run_yamllint = true diff --git a/ruff.toml b/ruff.toml index 2b9d85ba97..b4d3ac6268 100644 --- a/ruff.toml +++ b/ruff.toml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later # SPDX-FileCopyrightText: 2025 Felix Fontein -line-length = 160 +line-length = 120 [lint] # https://docs.astral.sh/ruff/rules/ @@ -80,3 +80,24 @@ unfixable = [] # Allow unused variables when underscore-prefixed or starting with dummy dummy-variable-rgx = "^(_|dummy).*$" + +[lint.pycodestyle] +max-line-length = 160 + +[format] +# https://docs.astral.sh/ruff/formatter/#configuration + +# Like Black, use double quotes for strings. +quote-style = "double" + +# Like Black, indent with spaces, rather than tabs. +indent-style = "space" + +# Like Black, respect magic trailing commas. +skip-magic-trailing-comma = false + +line-ending = "lf" + +# Disable auto-formatting of code examples in docstrings. Markdown, +# reStructuredText code/literal blocks and doctests are all supported. +docstring-code-format = false