-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathpyproject.toml
More file actions
68 lines (66 loc) · 3.24 KB
/
Copy pathpyproject.toml
File metadata and controls
68 lines (66 loc) · 3.24 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
[tool.uv]
workspace.members = [ "pyproject-fmt", "toml-fmt-common", "tox-toml-fmt" ]
[tool.ruff]
line-length = 120
format.preview = true
format.docstring-code-line-length = 100
format.docstring-code-format = true
lint.select = [
"ALL",
]
lint.ignore = [
"CPY", # the project omits copyright headers
"DOC", # documentation rules conflict with the public API style
"hardcoded-bind-all-interfaces", # tests may bind disposable servers to all interfaces
"incorrect-blank-line-before-class", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
"missing-trailing-comma", # Conflict with formatter
"multi-line-summary-first-line", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
"non-empty-init-module", # toml-fmt-common exposes its API from __init__.py
"single-line-implicit-string-concatenation", # Conflict with formatter
]
lint.per-file-ignores."**/build_backend.py" = [
"implicit-namespace-package", # is not a namespace
"print", # the CLI reports what it patched
"undocumented-public-function", # the build-backend hooks are PEP 517 contract, documented at module level
]
lint.per-file-ignores."**/src/toml_fmt_common/__init__.py" = [
"print", # the CLI reports what it formatted on stdout
]
lint.per-file-ignores."**/tests/**/*.py" = [
"assert", # asserts allowed in tests...
"D", # test names document behavior
"FBT", # positional booleans keep cases compact
"implicit-namespace-package", # test modules are not packages
"magic-value-comparison", # assertions need literal expected values
"subprocess-without-shell-equals-true", # tests pass trusted commands
"too-many-arguments", # fixtures may expose complete settings
"too-many-positional-arguments", # fixtures may expose complete settings
]
lint.per-file-ignores."**/toxfile.py" = [
"D", # tox defines the plugin contracts
"implicit-namespace-package", # each plugin is a module
"start-process-with-partial-path", # partial path is fine for tox command
"suspicious-subprocess-import", # the tox plugin invokes child processes
]
lint.per-file-ignores."tasks/**.py" = [
"D", # tasks are scripts, not public APIs
"implicit-namespace-package", # tasks are modules
"print", # tasks report progress
"start-process-with-partial-path", # tox resolves uv from PATH
"subprocess-without-shell-equals-true", # the build commands are ours, not untrusted input
"suspicious-subprocess-import", # build tasks invoke child processes
]
lint.isort = { known-first-party = [
"pyproject_fmt",
"toml_fmt_common",
"tox_toml_fmt",
], required-imports = [
"from __future__ import annotations",
] }
lint.preview = true
[tool.codespell]
builtin = "clear,usage,en-GB_to_en-US"
ignore-words = "ignore-words.txt"
skip = "*.snap,*/tests/data/*"
write-changes = true
count = true