Forráskód Böngészése

Use ruff to replace black and flake8

Kentaro Wada 1 éve
szülő
commit
ae649d6ab1
2 módosított fájl, 33 hozzáadás és 2 törlés
  1. 1 2
      requirements-dev.txt
  2. 32 0
      ruff.toml

+ 1 - 2
requirements-dev.txt

@@ -1,6 +1,5 @@
-black==22.8.0
 github2pypi==1.0.0
-hacking==4.1.0
 pytest
 pytest-qt
+ruff
 twine

+ 32 - 0
ruff.toml

@@ -0,0 +1,32 @@
+exclude = [
+  ".conda",
+  ".git",
+  "src",
+]
+
+line-length = 79
+indent-width = 4
+
+[lint]
+# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`)  codes by default.
+# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
+# McCabe complexity (`C901`) by default.
+select = ["E"]
+ignore = []
+
+# Allow fix for all enabled rules (when `--fix`) is provided.
+fixable = ["ALL"]
+unfixable = []
+
+[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"