Skip to content

Commit 10657f8

Browse files
committed
Add ruff format config.
1 parent f6f1a82 commit 10657f8

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ d032de3b16eed11ea3a31cd3d96d78f7c46a2ee0
77
e8f965fbf8154ea177c6622da149f2ae8533bd3c
88
e938ca5f20651abc160ee6aba10014013d04dcc1
99
eaa5e07b2866e05b6c7b5628ca92e9cb1142d008
10+
11+
# Code reformatting
12+
f6f1a82adcdf187099b60b1fbde7e2fe73a59122

antsibull-nox.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ run_isort = false
2424
run_black = false
2525
run_ruff_check = true
2626
ruff_check_config = "ruff.toml"
27+
run_ruff_format = true
28+
ruff_format_config = "ruff.toml"
2729
run_flake8 = false
2830
run_pylint = false
2931
run_yamllint = true

ruff.toml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: GPL-3.0-or-later
33
# SPDX-FileCopyrightText: 2025 Felix Fontein <[email protected]>
44

5-
line-length = 160
5+
line-length = 120
66

77
[lint]
88
# https://docs.astral.sh/ruff/rules/
@@ -81,3 +81,24 @@ unfixable = []
8181

8282
# Allow unused variables when underscore-prefixed or starting with dummy
8383
dummy-variable-rgx = "^(_|dummy).*$"
84+
85+
[lint.pycodestyle]
86+
max-line-length = 160
87+
88+
[format]
89+
# https://docs.astral.sh/ruff/formatter/#configuration
90+
91+
# Like Black, use double quotes for strings.
92+
quote-style = "double"
93+
94+
# Like Black, indent with spaces, rather than tabs.
95+
indent-style = "space"
96+
97+
# Like Black, respect magic trailing commas.
98+
skip-magic-trailing-comma = false
99+
100+
line-ending = "lf"
101+
102+
# Disable auto-formatting of code examples in docstrings. Markdown,
103+
# reStructuredText code/literal blocks and doctests are all supported.
104+
docstring-code-format = false

0 commit comments

Comments
 (0)