PyCQA / pycodestyle

Simple Python style checker in one Python file

Home Page:https://pycodestyle.pycqa.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clarify pyproject.toml support for configuration

maunzCache opened this issue · comments

Hi everyone,
as i learned by #813 it is still pretty much unclear if that project wants to support configuration in a pyproject.toml file. As the mentioned issue staled and is no longer publicly accessible i'd like to reopen discussion in this topic. However, feel free to close mine as duplicate and reopen the original.

Before i sum up the former discussion, let me first point out why this topic is still relevant.

Rationale

A pyproject.toml file should be relevant to every python developer as of PEP518 which introduces this file as configuration format for shippable python projects. As far as i understood, it is a new, common approach to what was previously provided by creating a setup.py file based python build. The pip documentation labels this a "legacy" (see docs).
The setup.cfg file is used by the setuptools building tool for python. Its common use-case was to override parts in the setup.py file. It still can be used and is not deprecated by any means i know of.

One can argue that not everyone requires either of these files. Still, they are both out there each having their right for existence.

Over the years a lot of other well-known tools have enriched our ways of configuring our python projects such as a tox.ini and whatnot. It is impossible to support everything but at the same time we cannot force developers to put their configuration into a file that is solely for one tool only.

With that in mind i'd like to have support for a configuration that follows the current desired way of handling python projects. Or to be clear: Support pyproject.toml configuration in pycodestyle.

Former discussion

Based on a gut feeling in 2020 both sides see some support and none support for configuration in pyproject.toml files.
A user tried to provide a contribution for that feature in October 2021, but it is unclear (to me) if that contribution every arrived in the codebase. The issue was closed one day after the announcement of a planned contribution.

With an update in June 2022 other projects in the python world picked up this style of configuration allowing to reconsider support. The issue was then marked as resolved on the same day with no further discussion.

Outro

Thanks for your time reading through this issue. I hope we can reevaluate if this is a feature that would make sense for the community and can be implemented by someone willing to.

Have a great day :)

it is not, as is indicated in that issue