Skip to content

Support pyproject.toml for configuration #813

Closed

Description

@Dr-ZeeD

I would love to see support for pyproject.toml for the configuration as, e.g., black does

Activity

  1. IanLee1521 commented on Dec 16, 2019

    @IanLee1521
    Member

    @ZeeD26 - would you be willing to submit a PR?

  2. sigmavirus24 commented on Dec 16, 2019

    @sigmavirus24
    Member

    @IanLee1521 the configuration management in this project is an abysmal nightmare. Until someone has time to do serious refactoring, I strongly advise against accepting this as a feature.

  3. IanLee1521 commented on Dec 17, 2019

    @IanLee1521
    Member

    Good point.

  4. asears commented on Dec 15, 2020

    @asears

    Is there more traction now for pyproject.toml format? Seems more prevalent on Github. We are looking at Poetry and this would be useful to have central configuration.

  5. sigmavirus24 commented on Dec 16, 2020

    @sigmavirus24
    Member

    Not really, no

  6. added a commit that references this issue on Jun 8, 2021
  7. added a commit that references this issue on Aug 4, 2021
  8. carstencodes commented on Aug 4, 2021

    @carstencodes

    Hi, I must agree to @sigmavirus24, the configuration is really messed up, but I think I found a simple and backward compliant way of adding this feature.

    The idea is to read the configuration from the pyproject.toml into a dictionary and add it to the configparser object.

    To keep the current behavior, that no dependencies must be used, the feature is added as an extra.

    There are still some things to do before #1007 can be merged:

    • Fallback mode: Read data from setup.cfg/tox.ini if no data is found in pyproject.toml
    • Add Unit tests for pyproject.toml

    Please tell me, what you think.

  9. pzelnip commented on Oct 27, 2021

    @pzelnip

    I'm not clear from the discussion: if someone were to implement pyproject.toml support (perhaps via the idea that @carstencodes suggested) would that be welcomed as a contribution? If yes, then it would be appreciated to indicate that clearly so as to encourage a contribution. If not, then I'd suggest this be closed so as to make it clear the format will not be supported (and if that decision is reversed the issue can always be reopened).

  10. carstencodes commented on Oct 27, 2021

    @carstencodes

    I'll try to add the missing parts on the upcoming weekend. Then it's up to the maintainers to merge or reject this PR.

    As we can see in PyCQA/flake8#234, supporting this issue might be hard to accomplish. Since discussion about pyproject.toml support is too heated for some projects (see flake8), it might be a good idea to wait for a toml parser in python (see https://bugs.python.org/issue40059).

    Or to use a workaround, like I did with carstencodes/flake518.

  11. sigmavirus24 commented on Oct 28, 2021

    @sigmavirus24
    Member

    If not, then I'd suggest this be closed

    Good idea

  12. pinned this issue on Oct 28, 2021
  13. holocronweaver commented on Jun 21, 2022

    @holocronweaver

    I see that pydocstyle supports pyproject.toml - could the same approach be taken in pycodestyle?

    This seems a fairly popular feature request considering it is both pinned and has received 80+ thumbs up. Maybe a good time to re-open this issue and re-examine, as it is nearing a year since the last update?

  14. locked as resolved and limited conversation to collaborators on Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions