tox-dev/pyproject-fmt

Enforce single line `description`

edgarrmondragon opened this issue · 3 comments

And maybe make it opt-in. This tool already strips whitespace from the field:

if "description" in project:
project["description"] = String.from_raw(str(project["description"]).strip())

Related:

I would be okay to accept a pull request in this direction.

Would it make sense to turn this:

description = """A Machine learning library that models and predicts learner engagement
                 with educational resources."""

Into this:

description = "A Machine learning library that models and predicts learner engagement with educational resources."

Or this:

description = """A Machine learning library that models and predicts learner engagement\
 with educational resources."""

? Both are fine IMO, though I prefer the first, as this isn't supposed to be a really long line (it's displayed on PyPI, etc).

More fun ones are ones like https://github.com/Abdel-RahmanSaied/mediaSecure/blob/caabcf86622a519a55a99f604d8dad60a27f94bc/pyproject.toml#L11-L47 :)

I've started #184 with the first option above as the goal.