

deps: add ruff
@4e2de919c4bf87ab605ecd396f6c5d12c291e980
--- pyproject.toml
+++ pyproject.toml
... | ... | @@ -20,9 +20,41 @@ |
20 | 20 |
dev = ["ruff", "pytest", "pytest-xdist"] |
21 | 21 |
other = ["youtube-dl@git+https://github.com/ytdl-org/youtube-dl.git", "openai", "aider-chat"] |
22 | 22 |
|
23 |
+# https://docs.astral.sh/ruff/configuration/ |
|
23 | 24 |
[tool.ruff] |
25 |
+line-length = 120 |
|
24 | 26 |
target-version = "py312" |
25 | 27 |
|
28 |
+[tool.ruff.lint] |
|
29 |
+select = ["ALL"] |
|
30 |
+ignore = [ |
|
31 |
+ "D10", # disabled required docstrings |
|
32 |
+ "ERA", # allow commented out code |
|
33 |
+ "TD", # disable TODO warnings |
|
34 |
+ "FIX002", # disable TODO warnings |
|
35 |
+ |
|
36 |
+ "COM812", # trailing comma |
|
37 |
+ "T201", # print |
|
38 |
+ "S101", # allow assert |
|
39 |
+ "PTH123", # Path.open |
|
40 |
+ "S603", # subprocess untrusted input |
|
41 |
+ |
|
42 |
+ "ANN101", # missing self type |
|
43 |
+] |
|
44 |
+ |
|
45 |
+[tool.ruff.lint.isort] |
|
46 |
+force-sort-within-sections = true |
|
47 |
+ |
|
48 |
+[tool.ruff.format] |
|
49 |
+# Like Black, use double quotes for strings. |
|
50 |
+quote-style = "double" |
|
51 |
+# Like Black, indent with spaces, rather than tabs. |
|
52 |
+indent-style = "space" |
|
53 |
+# Like Black, respect magic trailing commas. |
|
54 |
+skip-magic-trailing-comma = false |
|
55 |
+# Like Black, automatically detect the appropriate line ending. |
|
56 |
+line-ending = "auto" |
|
57 |
+ |
|
26 | 58 |
[tool.pyright] |
27 | 59 |
# typeCheckingMode = "strict" |
28 | 60 |
pythonVersion = "3.12" |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?