-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathpyproject.toml
More file actions
78 lines (68 loc) · 2.13 KB
/
Copy pathpyproject.toml
File metadata and controls
78 lines (68 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[tool.ruff]
line-length = 88
target-version = "py313"
lint.select = ["ALL"]
lint.ignore = [
# copyright notices
"CPY",
# pydocstyle
"D",
# todo comments
"TD",
# fixmes
"FIX",
# Unused function argument
"ARG001",
# Dynamically typed expressions (typing.Any)
"ANN401",
# Trailing comma missing
"COM812",
# Unnecessary `dict` call (rewrite as a literal)
"C408",
# Found commented-out code
"ERA001",
# Boolean-typed positional argument in function definition
"FBT001",
# Logging statement uses f-string
"G004",
# disabled on ruff's recommendation as causes problems with the formatter
"ISC001",
# Use of `assert` detected
"S101",
# `subprocess` call: check for execution of untrusted input
"S603",
# Starting a process with a partial executable path
"S607",
# Boolean default positional argument in function definition
"FBT002",
"E501", # line too long
"T201", # `print` found
"PLR2004", # Magic value used in comparison
]
exclude = ["zsh/*", "gdb/*", "home/.gdbinit-gef.py"]
[tool.ruff.lint.per-file-ignores]
# Django app: model imports must be deferred until the app registry is ready
"machines/eve/modules/paperless-perms/paperless_perms/apps.py" = ["PLC0415"]
# Standalone script, not a package
"nixosModules/niri/kwallet-tpm/kwallet-tpm-unlock.py" = ["INP001"]
# Standalone script run at build time to generate herdr plugins.json
"home-manager/modules/herdr/registry.py" = ["INP001"]
# WeeChat script: standalone module, and callbacks have fixed API signatures
"home/.weechat/python/herdr_notify.py" = ["INP001", "PLR0913", "PLR0917"]
# minihydra: keyword-arg-rich helpers + lazy uvicorn import
"pkgs/minihydra/src/minihydra/*.py" = ["PLR0913", "PLR0915", "PLC0415", "TC003"]
"pkgs/minihydra/tests/*.py" = ["PLC0415", "S101", "PLR0913", "TC003", "ANN"]
[tool.mypy]
python_version = "3.13"
warn_redundant_casts = true
strict = true
disallow_untyped_calls = true
disallow_untyped_defs = true
no_implicit_optional = true
exclude = ["gdb/", "zsh/"]
[[tool.mypy.overrides]]
module = "setuptools.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "pytest.*"
ignore_missing_imports = true