-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathpyproject.toml
134 lines (123 loc) · 4.89 KB
/
pyproject.toml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
[project]
authors = [{ name = "Nate Landau", email = "[email protected]" }]
dependencies = ["commitizen>=4.1.0", "poethepoet>=0.32.0", "pre-commit>=4.0.1", "typos>=1.29.0"]
description = "Home for my bootstrap script, dotfiles, and configuration files"
license = "MIT"
name = "dotfiles"
readme = "README.md"
requires-python = ">=3.11"
version = "0.1.0"
[project.urls]
homepage = "https://github.com/natelandau/dotfiles"
repository = "https://github.com/natelandau/dotfiles"
[tool.commitizen]
bump_message = "bump(release): v$current_version → v$new_version"
tag_format = "v$version"
update_changelog_on_bump = true
version = "0.1.0"
version_provider = "pep621"
[tool.uv]
dev-dependencies = ["mypy>=1.14.1", "ruff>=0.8.4"]
[tool.mypy] # https://mypy.readthedocs.io/en/latest/config_file.html
disallow_any_unimported = false
disallow_subclassing_any = false
disallow_untyped_decorators = false
disallow_untyped_defs = true
exclude = [
'tests/', # TOML literal string (single-quotes, regex okay, no escaping necessary)
]
follow_imports = "normal"
ignore_missing_imports = true
junit_xml = "reports/mypy.xml"
no_implicit_optional = true
pretty = false
show_column_numbers = true
show_error_codes = true
show_error_context = true
strict_optional = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_ignores = true
[tool.ruff] # https://github.com/charliermarsh/ruff
fix = true
line-length = 100
output-format = "grouped"
src = ["src", "tests"]
target-version = "py311"
[tool.ruff.lint]
ignore = [
"ANN204", # Missing return type annotation for special method `__init__`
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
"B006", # mutable-argument-default
"B008", # function-call-in-default-argument
"COM812", # Trailing comma missing"
"CPY001", # Missing copyright notice at top of file
"D107", # undocumented-public-init
"D213", # multi-line-summary-second-line
"D215", # section-underline-not-over-indented
"D406", # new-line-after-section-name
"D407", # dashed-underline-after-section
"D408", # section-underline-after-name
"D409", # section-underline-matches-section-length
"D413", # blank-line-after-last-section
"E501", # line-too-long
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean-typed positional argument in function definition
"FIX001", # line-contains-fixme
"FIX002", # Line contains TODO, consider resolving the issue
"G004", # Logging-f-string
"ISC001", # single-line-implicit-string-concatenation
"N805", # invalid-first-argument-name-for-method
"PGH003", # Use specific codes when ignoring issues
"PLR0913", # too-many-arguments
"RSE102", # Unnecessary parentheses on raised exception
"S311", # suspicious-non-cryptographic-random-usage
"TD001", # Invalid TODO format
"TD002", # Missing author in TODO
"TD003", # Missing issue link on the line following this TODO
"UP007", # non-pep604-annotation
]
per-file-ignores = { "tests/*.py" = [
"A002",
"A003",
"ANN001",
"ANN201",
"ARG002",
"ARG005",
"D102",
"ERA001",
"F403",
"PGH003",
"PLR0913",
"PLR0917",
"PLR2004",
"PLR6301",
"S101",
] }
select = ["ALL"]
unfixable = ["E712", "ERA001", "F401", "F841", "UP007"]
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
max-args = 6
[tool.ruff.format]
indent-style = "space"
line-ending = "auto"
quote-style = "double"
skip-magic-trailing-comma = false
[tool.poe.tasks]
[tool.poe.tasks.upgrade]
shell = """
echo "-- Upgrading packages --" &&
uv lock --upgrade &&
echo "-- Autoupdating pre-commit --" &&
pre-commit autoupdate
"""
[[tool.poe.tasks.lint.sequence]]
# shell = "typos"
shell = "typos --config .typos.toml --diff"
# [[tool.poe.tasks.lint.sequence]]
# shell = "pre-commit run --all-files"