Read configuration from setup.cfg and tox.ini?
See original GitHub issuegitlint can read configuration options from .gitlint
. Is it possible add feature for reading options from setup.cfg
and tox.ini
?
For example flake8 can read configuration options from .flake8
, setup.cfg
, or tox.ini
files. It is very convenient
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Is there a reason to have both tox.ini and setup.cfg in a python ...
I don't see any similarities. setup.cfg / setup.py are for building distributions, tox.ini is for running tests in on-the- ...
Read more >Configuration - tox
Note that setup.cfg requires the content to be under the tox:tox ... Setting it to config means that the value is read from...
Read more >Allow setup.cfg as an alternative configuration file #297 - GitHub
I understand that seing a "tox.ini" and "pytest.ini" signals useful information. On the other hand i'd like to see python move to a...
Read more >Understanding the purpose of tox.ini ⋆ Mark McDonnell
Tox is a tool that creates virtual environments, and installs the configured dependencies for those environments, for the purpose of testing a ...
Read more >Configuring Flake8 — flake8 6.0.0 documentation
In our case, we keep our Flake8 configuration in tox.ini . ... your config in .flake8 , setup.cfg , or tox.ini we expect...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Personally, gitlint isn’t a project specific to python. To the best of my knowledge people use it who aren’t using it on python projects. Switching to TOML might be nice but it’s not as common as a format as would be nice if we’re supporting a new format. Further supporting pyproject.toml only helps python projects, not anyone else. It then introduces a filename as an option that makes no sense to anyone outside the python community. I’m not fond of that, personally. Gitlint is written in python but it’s not just for python people
I have changed my mind on this and mostly agree with @webknjaz’s and @sigmavirus24 assessment at this point.
Supporting extra formats is a lot of maintenance overhead that I’m not willing to take on right now and it indeed can cause some complexity on the user side as well.
Having said that, with the pervasiveness of
pyproject.toml
these days, I have had some second thoughts about #115 and whether longer term we should consider supporting it. I know for gitlint itself I’m considering moving topyproject.toml
entirely (or as much as possible). To be clear: I mean only supportingpyproject.toml
in addition to.gitlint(.ini)
. No support fortox.ini
orsetup.cfg
as per the reasons stated.I think the preference of having everything sit in
pyproject.toml
or keep them all in separate config files is exactly that: preference. I can see that the occasional python developer or small project maintainer might be more inclined towards the single file for everything approach to declutter the project root - it’s definitely something that speaks to me. For multi-project maintainers with more standardized and automated setups, I can relate to @webknjaz’s arguments. I’ve worn both hats and again, think it’s mostly about preference and context.