Skip to content

Commit 33bf476

Browse files
authored
pyproject.toml -> add black/ruff config sections
thanks to astral-sh/ruff#10026 for suggestion on keeping single line Ellipsis
1 parent 72827ff commit 33bf476

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

pyproject.toml

+32
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,35 @@ exclude = ["build123d._dev"]
6161
[tool.setuptools_scm]
6262
write_to = "src/build123d/_version.py"
6363

64+
[tool.black]
65+
target-version = ["py39", "py310", "py311", "py312"]
66+
line-length = 88
67+
68+
[tool.ruff]
69+
# Same as Black.
70+
line-length = 88
71+
indent-width = 4
72+
target-version = ["py39", "py310", "py311", "py312"]
73+
74+
[tool.ruff.format]
75+
# Like Black, use double quotes for strings.
76+
quote-style = "double"
77+
78+
# Like Black, indent with spaces, rather than tabs.
79+
indent-style = "space"
80+
81+
# Like Black, respect magic trailing commas.
82+
skip-magic-trailing-comma = false
83+
84+
# Like Black, automatically detect the appropriate line ending.
85+
line-ending = "auto"
86+
87+
# Enable auto-formatting of code examples in docstrings. Markdown,
88+
# reStructuredText code/literal blocks and doctests are all supported.
89+
#
90+
# This is currently disabled by default, but it is planned for this
91+
# to be opt-out in the future.
92+
docstring-code-format = false
93+
94+
# Keep single-line signatures when body is an Ellipsis
95+
preview = true

0 commit comments

Comments
 (0)