-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
GitHub Action: Allow reading version from pyproject.toml #4294
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we look for required-version
in the tool.black
table first? https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#required-version
That seems better than attempting to parse the dependency metadata.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs nits.
Co-authored-by: Hugo van Kemenade <[email protected]>
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Could you also add a changelog entry?
How to best do this? This doesn't really fit the existing structure of the |
It can go in the "Integrations" section (https://github.com/psf/black/blob/main/CHANGES.md#integrations). The Actions version is a little disconnected, but for most people the change should still become useful when we make our next release. |
Description
This adds an
use_pyproject
input to the GitHub Action that – when set totrue
– will read the black version from pyproject.toml file. Either from theproject.dependencies
array or one of the arrays from theproject.optional-dependencies
table.Closes: #4285
Checklist - did you ...
CHANGES.md
if necessary?Trial runs at: https://github.com/srittau/python-asserts/actions/runs/8490172420, using this branch of one of my projects: https://github.com/srittau/python-asserts/tree/black-test