Skip to content

Commit 9a2f6c2

Browse files
committed
Move to Tombi for TOML linting & formatting rather than Taplo
1 parent 1f9903b commit 9a2f6c2

File tree

7 files changed

+103
-106
lines changed

7 files changed

+103
-106
lines changed

.pre-commit-config.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ repos:
2121
hooks:
2222
- id: check-github-workflows
2323

24+
- id: check-jsonschema
25+
args: [--schemafile, 'https://json.schemastore.org/yamllint.json'] # yamllint disable-line rule:quoted-strings
26+
files: ^\.yamllint\.yaml$ # yamllint disable-line rule:key-ordering
27+
name: Check yamllint configuration file
28+
types: [yaml]
29+
2430
- repo: https://github.com/jorisroovers/gitlint
2531
rev: v0.19.1
2632
hooks:
@@ -63,14 +69,11 @@ repos:
6369
- id: pretty-format-ini
6470
args: [--autofix]
6571

66-
- repo: https://github.com/ComPWA/taplo-pre-commit
67-
rev: v0.9.3
72+
- repo: https://github.com/tombi-toml/tombi-pre-commit
73+
rev: v0.6.50
6874
hooks:
69-
- id: taplo-format
70-
71-
- id: taplo-lint
72-
args: [--default-schema-catalogs]
73-
stages: [manual]
75+
- id: tombi-format
76+
- id: tombi-lint
7477

7578
- repo: https://github.com/astral-sh/ruff-pre-commit
7679
rev: v0.14.4

.pypi-redirects/Pydowndoc-executable/pyproject.toml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
[build-system]
2-
build-backend = "hatchling.build"
3-
requires = ["hatchling"]
4-
51
[project]
2+
name = "Pydowndoc-executable"
3+
version = "1.1.0"
4+
description = "You tried to install \"Pydowndoc-executable\". The correct package name is \"Pydowndoc-bin\"."
65
authors = [{ name = "Matt Norton", email = "matt@carrotmanmatt.com" }]
76
classifiers = ["Development Status :: 7 - Inactive"]
87
dependencies = ["Pydowndoc-bin"]
9-
description = "You tried to install \"Pydowndoc-executable\". The correct package name is \"Pydowndoc-bin\"."
10-
name = "Pydowndoc-executable"
11-
version = "1.1.0"
128

139
[project.readme]
14-
content-type = "text/markdown"
1510
text = """
1611
You tried to install `Pydowndoc-executable`. The correct package name is `Pydowndoc-bin`.
1712
1813
See [Pydowndoc](https://pypi.org/project/Pydowndoc) for the primary package and documentation.
1914
"""
15+
content-type = "text/markdown"
2016

2117
[project.urls]
2218
Repository = "https://github.com/CarrotManMatt/Pydowndoc"
2319

20+
[build-system]
21+
requires = ["hatchling"]
22+
build-backend = "hatchling.build"
23+
2424
[tool.hatch.build.targets.wheel]
2525
bypass-selection = true
2626

27-
2827
[tool.uv]
2928
managed = false
3029
package = false

.pypi-redirects/downdoc/pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
[build-system]
2-
build-backend = "hatchling.build"
3-
requires = ["hatchling"]
4-
51
[project]
2+
name = "downdoc"
3+
version = "1.2.0"
4+
description = "You tried to install \"downdoc\". The correct package name is \"Pydowndoc\"."
65
authors = [{ name = "Matt Norton", email = "matt@carrotmanmatt.com" }]
76
classifiers = ["Development Status :: 7 - Inactive"]
87
dependencies = ["Pydowndoc[bin]"]
9-
description = "You tried to install \"downdoc\". The correct package name is \"Pydowndoc\"."
10-
name = "downdoc"
11-
version = "1.2.0"
128

139
[project.readme]
14-
content-type = "text/markdown"
1510
text = """
1611
You tried to install `downdoc`. The correct package name is `Pydowndoc`.
1712
1813
See [Pydowndoc](https://pypi.org/project/Pydowndoc) for the primary package and documentation.
1914
"""
15+
content-type = "text/markdown"
2016

2117
[project.urls]
2218
Repository = "https://github.com/CarrotManMatt/Pydowndoc"
2319

20+
[build-system]
21+
requires = ["hatchling"]
22+
build-backend = "hatchling.build"
23+
2424
[tool.hatch.build.targets.wheel]
2525
bypass-selection = true
2626

.taplo.toml

Lines changed: 0 additions & 6 deletions
This file was deleted.

Pydowndoc-bin/pyproject.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
[build-system]
2-
build-backend = "hatchling.build"
3-
requires = ["hatchling", "packaging", "setuptools-scm"]
4-
51
[project]
2+
name = "Pydowndoc-bin"
3+
description = "Installable package for the downdoc binary executable."
4+
license = "MIT"
5+
license-files = ["LICENSE"]
66
authors = [
77
{ name = "Dan Allen", email = "dan@opendevise.com" },
8-
{ name = "Matt Norton", email = "matt@carrotmanmatt.com" },
8+
{ name = "Matt Norton", email = "matt@carrotmanmatt.com" }
99
]
10+
maintainers = [{ name = "Matt Norton", email = "matt@carrotmanmatt.com" }]
11+
keywords = ["AsciiDoc", "Markdown", "converter", "documentation"]
1012
classifiers = [
1113
"Development Status :: 5 - Production/Stable",
1214
"Environment :: Console",
@@ -15,29 +17,27 @@ classifiers = [
1517
"Operating System :: MacOS",
1618
"Operating System :: Microsoft :: Windows",
1719
"Operating System :: POSIX :: Linux",
18-
"Topic :: Software Development",
20+
"Topic :: Software Development"
1921
]
20-
description = "Installable package for the downdoc binary executable."
2122
dynamic = ["version"]
22-
keywords = ["AsciiDoc", "Markdown", "converter", "documentation"]
23-
license = "MIT"
24-
license-files = ["LICENSE"]
25-
maintainers = [{ name = "Matt Norton", email = "matt@carrotmanmatt.com" }]
26-
name = "Pydowndoc-bin"
2723

2824
[project.readme]
29-
content-type = "text/markdown"
3025
text = """
3126
Installable package for the downdoc binary executable.
3227
3328
See [Pydowndoc](https://pypi.org/project/Pydowndoc) for the primary package and documentation.
3429
"""
30+
content-type = "text/markdown"
3531

3632
[project.urls]
3733
Repository = "https://github.com/CarrotManMatt/Pydowndoc"
3834

35+
[build-system]
36+
requires = ["hatchling", "packaging", "setuptools-scm"]
37+
build-backend = "hatchling.build"
38+
3939
[tool.hatch.metadata.hooks]
40-
custom = {}
40+
custom = { }
4141

4242
[tool.uv]
4343
managed = false

pyproject.toml

Lines changed: 61 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
1-
[build-system]
2-
build-backend = "hatchling.build"
3-
requires = [
4-
"hatch-docstring-description",
5-
"hatch-vcs",
6-
"hatchling",
7-
"typing-extensions; python_version < '3.12'",
8-
]
9-
10-
11-
[dependency-groups]
12-
build = ["hatch", "pip"]
13-
build-dev = ["auditwheel", "setuptools-scm", { include-group = "build" }]
14-
dev = [
15-
{ include-group = "lint-format" },
16-
{ include-group = "pre-commit" },
17-
{ include-group = "test" },
18-
{ include-group = "type-check" },
19-
]
20-
lint-format = ["flake8-carrot>=0.1.2; python_version >= '3.14'", "ruff>=0.4"]
21-
pre-commit = ["pre-commit"]
22-
test = []
23-
type-check = ["mypy>=1.12"]
24-
25-
261
[project]
2+
name = "Pydowndoc"
3+
requires-python = ">=3.9"
4+
license = "Apache-2.0"
5+
license-files = ["LICENSE"]
276
authors = [{ name = "Matt Norton", email = "matt@carrotmanmatt.com" }]
7+
keywords = [
8+
"AsciiDoc",
9+
"Hatch",
10+
"Hatchling",
11+
"Markdown",
12+
"Python",
13+
"README",
14+
"build",
15+
"converter",
16+
"documentation",
17+
"metadata",
18+
"packaging",
19+
"pypi",
20+
"pyproject.toml"
21+
]
2822
classifiers = [
2923
"Development Status :: 5 - Production/Stable",
3024
"Environment :: Console",
@@ -35,51 +29,54 @@ classifiers = [
3529
"Operating System :: Microsoft :: Windows",
3630
"Operating System :: POSIX :: Linux",
3731
"Programming Language :: Python :: 3 :: Only",
32+
"Programming Language :: Python :: 3.9",
3833
"Programming Language :: Python :: 3.10",
3934
"Programming Language :: Python :: 3.11",
4035
"Programming Language :: Python :: 3.12",
4136
"Programming Language :: Python :: 3.13",
4237
"Programming Language :: Python :: 3.14",
4338
"Programming Language :: Python :: 3.15",
44-
"Programming Language :: Python :: 3.9",
4539
"Topic :: Software Development",
4640
"Topic :: Text Processing :: Markup",
47-
"Typing :: Typed",
41+
"Typing :: Typed"
4842
]
4943
dependencies = [
5044
"hatchling",
5145
"typed_classproperties>=1.3",
52-
"typing-extensions; python_version < '3.12'",
53-
]
54-
dynamic = ["description", "readme", "version"]
55-
keywords = [
56-
"AsciiDoc",
57-
"Hatch",
58-
"Hatchling",
59-
"Markdown",
60-
"Python",
61-
"README",
62-
"build",
63-
"converter",
64-
"documentation",
65-
"metadata",
66-
"packaging",
67-
"pypi",
68-
"pyproject.toml",
46+
"typing-extensions; python_version < '3.12'"
6947
]
70-
license = "Apache-2.0"
71-
license-files = ["LICENSE"]
72-
name = "Pydowndoc"
7348
optional-dependencies = { "bin" = ["Pydowndoc-bin"] }
74-
requires-python = ">=3.9"
75-
76-
[project.entry-points.hatch]
77-
downdoc-readme = "pydowndoc.hatch_hooks"
49+
dynamic = ["description", "readme", "version"]
7850

7951
[project.urls]
8052
Issues = "https://github.com/CarrotManMatt/Pydowndoc/issues"
8153
Repository = "https://github.com/CarrotManMatt/Pydowndoc"
8254

55+
[project.entry-points.hatch]
56+
downdoc-readme = "pydowndoc.hatch_hooks"
57+
58+
[dependency-groups]
59+
dev = [
60+
{ include-group = "lint-format" },
61+
{ include-group = "pre-commit" },
62+
{ include-group = "test" },
63+
{ include-group = "type-check" }
64+
]
65+
build = ["hatch", "pip"]
66+
build-dev = ["auditwheel", "setuptools-scm", { include-group = "build" }]
67+
lint-format = ["flake8-carrot>=0.1.2; python_version >= '3.14'", "ruff>=0.4"]
68+
pre-commit = ["pre-commit"]
69+
test = []
70+
type-check = ["mypy>=1.18.1"]
71+
72+
[build-system]
73+
requires = [
74+
"hatch-docstring-description",
75+
"hatch-vcs",
76+
"hatchling",
77+
"typing-extensions; python_version < '3.12'"
78+
]
79+
build-backend = "hatchling.build"
8380

8481
[tool.hatch.build]
8582
only-packages = true
@@ -89,13 +86,12 @@ artifacts = ["README.adoc"]
8986

9087
[tool.hatch.metadata.hooks]
9188
custom = { readme-path = "README.adoc" }
92-
docstring-description = {}
89+
docstring-description = { }
9390

9491
[tool.hatch.version]
9592
raw-options = { local_scheme = "no-local-version", version_scheme = "python-simplified-semver" }
9693
source = "vcs"
9794

98-
9995
[tool.mypy]
10096
check_untyped_defs = true
10197
disallow_any_decorated = true
@@ -118,18 +114,20 @@ enable_error_code = [
118114
"redundant-self",
119115
"truthy-bool",
120116
"truthy-iterable",
121-
"unused-awaitable",
117+
"unused-awaitable"
122118
]
123119
extra_checks = true
124120
mypy_path = "stubs"
125121
no_implicit_reexport = true
122+
strict_bytes = true
126123
strict_equality = true
124+
strict_equality_for_none = true # tombi: lint.rules.key-not-allowed.disabled = true
127125
warn_redundant_casts = true
128126
warn_return_any = true
129127
warn_unreachable = true
130128
warn_unused_configs = true
131129
warn_unused_ignores = true
132-
130+
warn_incomplete_stub = true
133131

134132
[tool.ruff]
135133
indent-width = 4
@@ -167,7 +165,7 @@ ignore = [
167165
"TD002",
168166
"TD003",
169167
"UP037",
170-
"W191",
168+
"W191"
171169
]
172170
select = ["ALL", "D204", "D213", "D401"]
173171
task-tags = ["BUG", "DONE", "FIXME", "HACK", "IDEA", "ISSUE", "NOBUG", "NOTE", "REQ", "TODO"]
@@ -183,13 +181,13 @@ strict = true
183181
[tool.ruff.lint.pep8-naming]
184182
classmethod-decorators = [
185183
"typed_classproperties.cached_classproperty",
186-
"typed_classproperties.classproperty",
184+
"typed_classproperties.classproperty"
187185
]
188186
extend-ignore-names = [
189187
"BROKEN_*_MESSAGE",
190188
"INVALID_*_MESSAGE",
191189
"NO_*_MESSAGE",
192-
"OUTPUT_CONVERSION_TO_STRING",
190+
"OUTPUT_CONVERSION_TO_STRING"
193191
]
194192

195193
[tool.ruff.lint.pycodestyle]
@@ -200,7 +198,7 @@ max-doc-length = 95
200198
convention = "google"
201199
property-decorators = [
202200
"typed_classproperties.cached_classproperty",
203-
"typed_classproperties.classproperty",
201+
"typed_classproperties.classproperty"
204202
]
205203

206204
[tool.ruff.lint.pylint]
@@ -212,6 +210,9 @@ max-returns = 10
212210
[tool.ruff.lint.pyupgrade]
213211
keep-runtime-typing = true
214212

213+
[tool.tombi.format.rules]
214+
indent-width = 4
215+
line-width = 95
215216

216217
[tool.uv]
217218
default-groups = ["dev"]
@@ -223,7 +224,7 @@ required-environments = [
223224
"sys_platform == 'darwin' and platform_machine == 'x86_64'",
224225
"sys_platform == 'linux' and platform_machine == 'aarch64'",
225226
"sys_platform == 'linux' and platform_machine == 'x86_64'",
226-
"sys_platform == 'win32' and platform_machine == 'AMD64'",
227+
"sys_platform == 'win32' and platform_machine == 'AMD64'"
227228
]
228229
required-version = ">=0.5.21"
229230
trusted-publishing = "always"

0 commit comments

Comments
 (0)