refactor: replace taplo with tombi for toml formatting
This commit is contained in:
@@ -35,9 +35,9 @@ pre-commit:
|
||||
- "*.yml"
|
||||
run: prettier --write {staged_files}
|
||||
stage_fixed: true
|
||||
taplo:
|
||||
tombi:
|
||||
glob: "*.toml"
|
||||
run: taplo format {staged_files}
|
||||
run: tombi format {staged_files}
|
||||
stage_fixed: true
|
||||
fail_on_changes: "ci"
|
||||
format-xsl:
|
||||
|
||||
101
pyproject.toml
101
pyproject.toml
@@ -5,12 +5,12 @@ description = "Python tooling to build the fsfe websites"
|
||||
readme = "README.md"
|
||||
requires-python = "==3.14.*"
|
||||
dependencies = [
|
||||
"lxml", # XML parser
|
||||
"nltk", # For stopwords for the search index
|
||||
"python-iso639", # For getting english language names of languages from two letter codes.
|
||||
"requests", # For HTTP requests
|
||||
"tdewolff-minify", # For minification html css and js
|
||||
"platformdirs", # Get cache dirs and similar by platform
|
||||
"lxml", # XML parser
|
||||
"nltk", # For stopwords for the search index
|
||||
"platformdirs", # Get cache dirs and similar by platform
|
||||
"python-iso639", # For getting english language names of languages from two letter codes.
|
||||
"requests", # For HTTP requests
|
||||
"tdewolff-minify", # For minification html css and js
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
@@ -18,13 +18,13 @@ build = "fsfe_website_build:main"
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"lefthook", # pre-commit hook
|
||||
"pyright", # python typechecker
|
||||
"pytest", # python test runner
|
||||
"pytest-mock", # helper for mocking in pytest
|
||||
"reuse", # for enforcing licensing
|
||||
"ruff", # python formatter and linter
|
||||
"taplo", # toml formatter
|
||||
"lefthook", # pre-commit hook
|
||||
"pyright", # python typechecker
|
||||
"pytest", # python test runner
|
||||
"pytest-mock", # helper for mocking in pytest
|
||||
"reuse", # for enforcing licensing
|
||||
"ruff", # python formatter and linter
|
||||
"tombi", # toml formatter
|
||||
"types-lxml", # type stubs for lxml
|
||||
]
|
||||
|
||||
@@ -37,53 +37,56 @@ module-name = "fsfe_website_build"
|
||||
module-root = "build"
|
||||
|
||||
[tool.ruff.lint]
|
||||
# See https://docs.astral.sh/ruff/rules/ for information
|
||||
# See https://docs.astral.sh/ruff/rules/ for information
|
||||
select = [
|
||||
"ANN", # Flake 8 type annotations
|
||||
"A", # prevent using keywords that clobber python builtins
|
||||
"ARG", # Unused arguments
|
||||
"ASYNC", # Flake 8 aysnc
|
||||
"B", # bugbear: security warnings
|
||||
"C4", # Comprehensions
|
||||
"D", # pydocstyle, recommended with pydoclint
|
||||
"E", # pycodestyle
|
||||
"ERA", # Commented out code
|
||||
"F", # pyflakes
|
||||
"ANN", # Flake 8 type annotations
|
||||
"A", # prevent using keywords that clobber python builtins
|
||||
"ARG", # Unused arguments
|
||||
"ASYNC", # Flake 8 aysnc
|
||||
"B", # bugbear: security warnings
|
||||
"C4", # Comprehensions
|
||||
"D", # pydocstyle, recommended with pydoclint
|
||||
"E", # pycodestyle
|
||||
"ERA", # Commented out code
|
||||
"F", # pyflakes
|
||||
"FURB", # More upgrades to newer styles
|
||||
"G", # Logging Formatting
|
||||
"I", # ordered import
|
||||
"ISC", # implicit string concatenation
|
||||
"LOG", # Logging stuff
|
||||
"N", # pep 8 naming
|
||||
"G", # Logging Formatting
|
||||
"I", # ordered import
|
||||
"ISC", # implicit string concatenation
|
||||
"LOG", # Logging stuff
|
||||
"N", # pep 8 naming
|
||||
"PERF", # SOme performance stuff
|
||||
"PIE", # Some extra checks
|
||||
"PL", # Pylint
|
||||
"PTH", # Use pathlib
|
||||
"PT", # Pytest style
|
||||
"Q", # flake 8 quotes
|
||||
"RET", # Return types
|
||||
"RSE", # Unneeded exception parentheses
|
||||
"RUF", # the ruff developer's own rules
|
||||
"SIM", # Simplify
|
||||
"S", # flake8-bandit, more secutiry checks
|
||||
"T20", # Warn about prints
|
||||
"TC", # Type checking
|
||||
"TRY", # Error handling stuff
|
||||
"UP", # Update syntax to newer versions
|
||||
"W", # pycodestyle warnings
|
||||
"PIE", # Some extra checks
|
||||
"PL", # Pylint
|
||||
"PTH", # Use pathlib
|
||||
"PT", # Pytest style
|
||||
"Q", # flake 8 quotes
|
||||
"RET", # Return types
|
||||
"RSE", # Unneeded exception parentheses
|
||||
"RUF", # the ruff developer's own rules
|
||||
"SIM", # Simplify
|
||||
"S", # flake8-bandit, more secutiry checks
|
||||
"T20", # Warn about prints
|
||||
"TC", # Type checking
|
||||
"TRY", # Error handling stuff
|
||||
"UP", # Update syntax to newer versions
|
||||
"W", # pycodestyle warnings
|
||||
]
|
||||
ignore = [
|
||||
"D203", # incorrect-blank-line-before-class, Conflicts with D211
|
||||
"D213", # multi-line-summary-second-line, Conflicts with D212
|
||||
"D203", # incorrect-blank-line-before-class, Conflicts with D211
|
||||
"D213", # multi-line-summary-second-line, Conflicts with D212
|
||||
]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"build/fsfe_website_build_tests*/*" = [
|
||||
"D", # We do not need to document the tests.
|
||||
"TRY003", # Dont worry about big exceptions in tests
|
||||
"S101", # Allow asserts in tests
|
||||
"D", # We do not need to document the tests.
|
||||
"TRY003", # Dont worry about big exceptions in tests
|
||||
"S101", # Allow asserts in tests
|
||||
]
|
||||
|
||||
[tool.pyright]
|
||||
typeCheckingMode = "strict"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = ["--import-mode=importlib"]
|
||||
python_files = ["*_test.py"]
|
||||
|
||||
40
uv.lock
generated
40
uv.lock
generated
@@ -151,7 +151,7 @@ dev = [
|
||||
{ name = "pytest-mock" },
|
||||
{ name = "reuse" },
|
||||
{ name = "ruff" },
|
||||
{ name = "taplo" },
|
||||
{ name = "tombi" },
|
||||
{ name = "types-lxml" },
|
||||
]
|
||||
|
||||
@@ -173,7 +173,7 @@ dev = [
|
||||
{ name = "pytest-mock" },
|
||||
{ name = "reuse" },
|
||||
{ name = "ruff" },
|
||||
{ name = "taplo" },
|
||||
{ name = "tombi" },
|
||||
{ name = "types-lxml" },
|
||||
]
|
||||
|
||||
@@ -552,20 +552,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/14/a0/bb38d3b76b8cae341dad93a2dd83ab7462e6dbcdd84d43f54ee60a8dc167/soupsieve-2.8-py3-none-any.whl", hash = "sha256:0cc76456a30e20f5d7f2e14a98a4ae2ee4e5abdc7c5ea0aafe795f344bc7984c", size = 36679, upload-time = "2025-08-27T15:39:50.179Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "taplo"
|
||||
version = "0.9.3"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/71/79/513513960377e1212a28446acb323cf77dfce162e825a822f035b02a422d/taplo-0.9.3.tar.gz", hash = "sha256:6b73b45b9adbd20189d8981ac9055d5465227c58bbe1b0646a7588a1a5c07a1a", size = 102556, upload-time = "2024-08-19T10:22:15.005Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/61/42/a93c18ebb7cf3ee2a7a30dd2fda654aca458956c3b64bdfb9d82b2c42679/taplo-0.9.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:1c3db689406d538420c64aa779ac8694cf44c13a46e158d6df406de65980b9c7", size = 4248497, upload-time = "2024-08-19T10:21:59.954Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/82/d2/f5b6e4a4f474f9fe613b5b91012520c3f62e46748a6ce9fd61fc2fb52fa2/taplo-0.9.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:1e7782f33f97e7aa658d18788748bce5cf3ce440eeb419cf5861cf542740e610", size = 4044421, upload-time = "2024-08-19T10:22:03.06Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7d/32/4ac46ff15bb9d060f50ad31fb3a80aa8ee1e6ca500104ca8569f6fbdee3d/taplo-0.9.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:29d4d7abfcc10bd536e5a43fe6ec2c1931507c1433e79df03ea22e1030611cb6", size = 4334420, upload-time = "2024-08-19T10:22:05.68Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ef/cc/656aed22a59cf4c50dcaaa66aaa570d4a1412acdd8ea429120a6bb00f336/taplo-0.9.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33f12648f273478d7330cb3529c82f48f388501e1122e0bea78bce5ff5972b8b", size = 4468935, upload-time = "2024-08-19T10:22:08.106Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/21/15/d8db1db6382b444122fa1a66fe5fe0dd5b04bfbe68c74bdb5345aec11eb2/taplo-0.9.3-py3-none-win32.whl", hash = "sha256:9ab7df76a3facc6d0dd2fe2dae3e8eb52fa458d31d27878d5eac14f5cbc0abac", size = 3482612, upload-time = "2024-08-19T10:22:10.904Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/42/3c/df6641d7e2e84a6dd4de3b3a4426db7f6a7270c05bbdeadd523645c9c45f/taplo-0.9.3-py3-none-win_amd64.whl", hash = "sha256:7d80b630b93fb43cee99d1e1ee07b616236dc5615efaf7cd51074b4cffc33bab", size = 3985843, upload-time = "2024-08-19T10:22:13.446Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tdewolff-minify"
|
||||
version = "2.24.7"
|
||||
@@ -589,6 +575,28 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/93/fb/d0c03ee765639ff4c4ba06b247b56edb8314623fe7efb3f06d7e1c3a2a33/tdewolff_minify-2.24.7-cp314-cp314t-win_amd64.whl", hash = "sha256:7338637f1c7b7a2f3d6b354ecae04e4dcf76e3b2e4089f38192efc0793d280dc", size = 3716829, upload-time = "2025-11-08T08:56:12.352Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tombi"
|
||||
version = "0.7.11"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/d9/df/2d28eef46563798d4ca17f0d0826b94e8eb430edef15f5b7efc3b44aadec/tombi-0.7.11.tar.gz", hash = "sha256:82d1c41d34da3a6a7c4e11b181edc26fb2fd13bf76ea5f3447a53a0444fbc091", size = 472046, upload-time = "2025-12-25T16:14:59.71Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/9c/47/f077bf798d6af40c2669b6a9533978993193d51bca75613959679fe76c73/tombi-0.7.11-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:f0e6305c12f8a5e471a9159064bacbab4fd93de328b5db6c828aa7da15ca2acc", size = 9064434, upload-time = "2025-12-25T16:14:50.292Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7a/d9/290d506d6685849ccd6012f4253de1bb10037def31925cf6c182da42a1c2/tombi-0.7.11-py3-none-macosx_11_0_arm64.whl", hash = "sha256:65475db4d1f68c3bfa8e5119db733071184489fb9120d666e8d6f0cad821f087", size = 8770616, upload-time = "2025-12-25T16:14:48.444Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f4/87/cf0268e9986241fb867b7269fb77a2429987dccf7e2843e7c47f044de6dd/tombi-0.7.11-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:69d55708c1ccf651ae626bad6a5ba0e7f6b5102373905e48ffc76a7fdf37cfab", size = 8971843, upload-time = "2025-12-25T16:14:37.976Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9c/73/772385c3fbf5598cc1521716ef6f3d71eac54fcffd1d67c8d1553f3e903b/tombi-0.7.11-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5f8243d31259804009a1960ee3e8cdf5aec3151a6625be5109937b118c8d36d2", size = 10098451, upload-time = "2025-12-25T16:14:44.093Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/99/54/00c278fecb341fff0b08e4c24b0f9af59356b9cefe79e784842e9c187ff5/tombi-0.7.11-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1307059a1cbed9a9a4add2f6a340986156aeee3830b9c6686ba5b88baabdfb6c", size = 10197359, upload-time = "2025-12-25T16:14:39.871Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e6/11/d47663b128497a9b290f78d49925d1e2b6d8117d49148dbf15c50850a316/tombi-0.7.11-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b42adcc15025e81818686313d830b0ef47c505f0451768574ddd1e4198a63724", size = 9108951, upload-time = "2025-12-25T16:14:41.969Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/44/ff/6b85c162e27de3232e8548ef18fd49a87da43886cad28f48358d8004959e/tombi-0.7.11-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55fc218065d33b34cf1dbcafb0d5e9be0dcc5a346a00df420130cadb36c18029", size = 9405453, upload-time = "2025-12-25T16:14:46.309Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5f/91/f59cb04601ac6edcb63a2e6c3f98c788adddf6893e2f788b7029acc29fa7/tombi-0.7.11-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:234a1624959d6adb89e10cad7847e6270a28c40fb1f3c0444c7f2e9519a5de49", size = 9245316, upload-time = "2025-12-25T16:14:35.679Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1a/98/ac113e7aa01b89150ab689555b56f7d70c169156e153dfab6095d09cc2b5/tombi-0.7.11-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e05862a896913de66ffb152c354d793376a1ab74c2241c2fb7255820b2a081b9", size = 9266952, upload-time = "2025-12-25T16:14:52.237Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7c/14/33cbfc9d3ba013e74453dfd6cace2cf1d118161ded758325c4ecd46b58e3/tombi-0.7.11-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:bdfbf018b6f7bd39a3f572d98ced85d77b91b86736623d728b271f168165ac45", size = 8992879, upload-time = "2025-12-25T16:14:54.369Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/88/e0/91aaaa7435a8d5cab49e10066be37b908016a38dd7ecb89398d92907dec5/tombi-0.7.11-py3-none-musllinux_1_2_i686.whl", hash = "sha256:f295d870c7f6f2e88bcce69a4cb527a3f821f55b42e010c5e1fd81e3c7eed253", size = 9570488, upload-time = "2025-12-25T16:14:56.361Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ce/ec/dbe8c4d937a82a0d04a44b8e34b05ce8bfc489fec04f4489e5562292705b/tombi-0.7.11-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:510daab10c7f77329cb2c1c6c64a3692ddf4e04746a08e9f642d19a4b5000f68", size = 9633925, upload-time = "2025-12-25T16:14:58.138Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/26/8a/c2c8205b0cde7472df2b7377eb853edf6f8d2f2320478059d383e0ca92ac/tombi-0.7.11-py3-none-win32.whl", hash = "sha256:f1f7f35dc60302adf64a3e16b7125f8d56a4c445a37e71d58d363cc45a30cb1d", size = 7142499, upload-time = "2025-12-25T16:15:03.28Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6c/86/d1762e54e3372713efaf18318a90673f810567e5c7a3e7936e74485be1ab/tombi-0.7.11-py3-none-win_amd64.whl", hash = "sha256:50a969d00d0fc4e85d84e01353afa603014550dc2e56a5a502f4ebd614bb03b2", size = 8326898, upload-time = "2025-12-25T16:15:01.276Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tomlkit"
|
||||
version = "0.13.3"
|
||||
|
||||
Reference in New Issue
Block a user