Skip to content

Commit

Permalink
pyproject.toml -> add black/ruff config sections
Browse files Browse the repository at this point in the history
thanks to astral-sh/ruff#10026 for suggestion on keeping single line Ellipsis
  • Loading branch information
jdegenstein authored Feb 21, 2024
1 parent 72827ff commit 33bf476
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,35 @@ exclude = ["build123d._dev"]
[tool.setuptools_scm]
write_to = "src/build123d/_version.py"

[tool.black]
target-version = ["py39", "py310", "py311", "py312"]
line-length = 88

[tool.ruff]
# Same as Black.
line-length = 88
indent-width = 4
target-version = ["py39", "py310", "py311", "py312"]

[tool.ruff.format]
# 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

# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"

# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
#
# This is currently disabled by default, but it is planned for this
# to be opt-out in the future.
docstring-code-format = false

# Keep single-line signatures when body is an Ellipsis
preview = true

0 comments on commit 33bf476

Please sign in to comment.