pyproject.toml: specify description is one line - #1533
Conversation
I believe adding a |
Would https://github.com/tox-dev/pyproject-fmt be a better place for such an auto-fix? In fact it already strips whitespace from the |
When we tried to enforce one-line The middle ground option sounds good. |
|
FYI, the problem was backward compatibility; people didn't want a project that used to build start to fail due to this. Failing a previously passing build is the problem, and there's not usually a way around it.1 Projects that don't have a large user base absolutely can (and should in my opinion) error on this. It was only because older code supported it. It would have been nice if the pyproject.toml support had included it from the start, as there was no legacy at that time, but it is obviously too late. 0.2% of pyproject.tomls with a Ruff does not auto fix or even lint Footnotes
|
Hmm, I checked the docs and there was one certain RUF200 rule which sounded promising... However doing this in |
Latest |
Great, thanks for the initiative! |
|
Thanks! |
See pypa/pyproject-metadata#30. This fills the Summary field, which must be a single line, so this should also be a single line. Historically, tools have done different things here. Setuptools removes anything after the first line. pyproject-metadata based backends (pdm-backend, scikit-build-core, and meson-python) join the lines into one line. The next version of scikit-build-core will error instead. Third party tools reading a config like this:
Cannot know if the
Summarywill be"Two Line","Two", or an error.Enforcing this as one line also helps authors that put what should go into
project.readme.texthere instead.There are three levels of response possible here, this PR is the middle one:
📚 Documentation preview 📚: https://python-packaging-user-guide--1533.org.readthedocs.build/en/1533/