This repository was archived by the owner on Oct 17, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
This repository was archived by the owner on Oct 17, 2024. It is now read-only.
Some fields ignore column-width #26
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
If you set column-width, some fields ignore it and get rewritten anyway. It should be noted that column-width does seem to respect trailing commas, so a = [ "b",\n] is kept even if it's set. (Also, I think it should be clarified in the docs that the column width is in characters, not entries).
Before:
[build-system]
build-backend = "hatchling.build"
requires = [ "hatchling" ]
[project]
keywords = [ "package" ]
authors = [ { name = "Kitware" } ]
dynamic = [ "version" ]
dependencies = [ "sphinx" ]
[tool.hatch]
build.targets.wheel.packages = [ "sphinxcontrib" ]
[tool.pytest.ini_options]
testpaths = [ "tests" ]
[tool.pyproject-fmt]
column_width = 80After:
[build-system]
build-backend = "hatchling.build"
requires = [
"hatchling",
]
[project]
keywords = [
"package",
]
authors = [ { name = "Kitware" } ]
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dynamic = [
"version",
]
dependencies = [
"sphinx",
]
[tool.hatch]
build.targets.wheel.packages = [ "sphinxcontrib" ]
[tool.pyproject-fmt]
column_width = 80
[tool.pytest.ini_options]
testpaths = [ "tests" ]This does seem to be happening on sorted fields. I think the presence of the trailing comma should be kept for sorting.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed