Skip to content

Commit 464b902

Browse files
committed
Add ruff format config.
1 parent 68458c6 commit 464b902

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
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+
68458c6ac05d2d8e6fac0d7c759c479d7a63f8d4

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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,21 @@ unfixable = []
8181

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

0 commit comments

Comments
 (0)