Closed woutervh closed 1 year ago
Well, it is not our documented header :-) But you're right that allowing (or even preferring) a tool-prefix is a good idea. I'll take a quick look.
Actually, it is pretty irritating to implement. There are quite some places where we have simple code like this:
try:
result = self._get_text(
'zest.releaser', 'extra-message', default=default)
except (NoSectionError, NoOptionError, ValueError):
return default
So: we just try to grab the option and return a default upon an error. If we'd want to support both [zest.releaser]
and [tool:zest.releaser]
, it would quickly turn into a mess.
Or we'd have to re-do our parsing of the setup.cfg
completely.
So for now I'd say we should just stick with [zest.releaser]
. The "tools:" is just a recent convention, there's nothing broken by not implementing it. (At least, that's my impression at the moment).
@woutervh : now that we support pyproject.toml, there's a nice [tool.zest-releaser]
. You only have to switch from setup.cfg to pyproject.toml, which is OK, I assume :-)
Indeed, I switched to pyproject.toml for all my projects
tools like pytest use a header [tool:pytest] in setup.cfg
` [tool:isort] ....
[tool:pep8] `
but zest.releaser breaks on this:
the setting python-file-with-version = src/mypackage/init.py is found with header [zest.releaser], and not found when using [tool:zest.releaser],