Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for pyproject.toml configuration. #301

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Quick Start
-----------

```bash
pip3 install green # To upgrade: "pip3 install --upgrade green"
pip3 install green # To upgrade: "pip3 install --upgrade green"; To include pyproject.toml support in python <= 3.11 "pip3 install green[toml]"
```

Now run green...
Expand Down
5 changes: 4 additions & 1 deletion green/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
import coverage # pragma: no cover

try:
import tomllib # pragma: no cover
if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib

supports_tomllib = True
except ImportError:
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ packages = find:

[options.extras_require]
dev = file:requirements-dev.txt
toml = tomli>=1.10 ; python_version < "3.11"

[options.package_data]
green = VERSION, shell_completion.sh
Expand Down
Loading