1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00

Add ruff format config.

This commit is contained in:
Felix Fontein 2025-10-27 20:27:40 +01:00
parent 340ff8586d
commit 31734bb13f
3 changed files with 27 additions and 1 deletions

View file

@ -7,3 +7,6 @@ d032de3b16eed11ea3a31cd3d96d78f7c46a2ee0
e8f965fbf8154ea177c6622da149f2ae8533bd3c
e938ca5f20651abc160ee6aba10014013d04dcc1
eaa5e07b2866e05b6c7b5628ca92e9cb1142d008
# Code reformatting
d80f0a1dba05ce7da41e64afc275335b7154708a

View file

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

View file

@ -2,7 +2,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2025 Felix Fontein <felix@fontein.de>
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