Supporting configuration from pyproject.toml
#300
ikollipara
started this conversation in
Enhancements
Replies: 1 comment
-
I agree that adding support for Unfortunately tomllib was only added to the standard library in 3.11 and we are currently backward compatible with 3.8, or soon 3.9 since 3.8 is now deprecated upstream. https://docs.python.org/3/library/tomllib.html This means that for versions prior to 3.11 we will need to add an explicit dependency on tomllib, which should be fine. I would look at what other projects are doing for resolution order (mypy, pylint, ruff, black), if they are consistent then I would recommend to stay consistent, if not then we can pick whatever is making the most sense for green. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently the project supports a wide range of
.ini
-style configurations. However, the direction that many tools (black, ruff, coverage, etc.) are moving is to having a defined configuration in thepyproject.toml
. Given that python now features a built-in package for reading.toml
files (tomllib
) I think it shouldn't be too difficult to pull the configuration from there.The main consideration is where in the resolution order does the
pyproject.toml
go. I'm in favor of it being the second to last place for configuration, to push new users towards it.But I'm completely open to thoughts, what do you think?
Beta Was this translation helpful? Give feedback.
All reactions