diff options
author | Ben Sima <ben@bsima.me> | 2024-04-10 19:56:46 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2024-04-10 19:56:46 -0400 |
commit | 2c09c7f73e2fc770f42b5dd2588aa9634b4e7c6e (patch) | |
tree | a6c49dddb7b1735a0f8de2a9a5f4efb605f16f36 /pyproject.toml | |
parent | 051973aba8953ebde51eb1436fb3994e7ae699dc (diff) |
Switch from black to ruff format
Ruff is faster and if it supports everything that black supports than why not? I
did have to pull in a more recent version from unstable, but that's easy to do
now. And I decided to just go ahead and configure ruff by turning on almost all
checks, which meant I had to fix a whole bunch of things, but I did that and
everything is okay now.
Diffstat (limited to 'pyproject.toml')
-rw-r--r-- | pyproject.toml | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/pyproject.toml b/pyproject.toml index 7f7d0d3..dbb1de1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,33 @@ -[tool.black] -line-length = 80 - [tool.mypy] strict = true implicit_reexport = true + +[tool.ruff] +exclude = ["_", ".git"] +line-length = 80 +indent-width = 4 +target-version = "py310" + +[tool.ruff.format] +preview = true +quote-style = "double" +indent-style = "space" +skip-magic-trailing-comma = false +line-ending = "auto" + +[tool.ruff.lint] +preview = true +select = ["ALL"] +fixable = ["ALL"] +ignore = [ + "ANN401", # any-type, we allow typing.Any, although we shouldn't + "CPY001", # missing-copyright-notice + "D203", # no-blank-line-before-class + "D212", # multi-line-summary-first-line + "E203", # whitespace-before-punctuation, doesn't work with ruff format + "INP001", # implicit-namespace-package + "N999", # invalid-module-name + "S310", # suspicious-url-open-usage, doesn't work in 0.1.5 + "S603", # subprocess-without-shell-equals-true, false positives + "S607", # start-process-with-partial-path +] |