STY Uses black's with target_version >= 3.7#20294
STY Uses black's with target_version >= 3.7#20294thomasjpfan merged 2 commits intoscikit-learn:mainfrom
Conversation
|
|
||
| [tool.black] | ||
| line-length = 88 | ||
| target_version = ['py37', 'py38', 'py39'] |
There was a problem hiding this comment.
Is there a way to get that from setup.py metadata?
There was a problem hiding this comment.
I think the idea is pyproject.toml to be static, to avoid all issues with dynamic behavior in setup.py. It's indeed slightly not ideal to change this for each Python version, but if you read psf/black#751 in the end as long as py37 is in there, the rest has no effect. There is no changes in formatting for Python3.7+.
|
OK seems good then.
…On Thu, 17 Jun 2021 at 21:22, Roman Yurchak ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pyproject.toml
<#20294 (comment)>
:
> @@ -19,6 +19,7 @@ requires = [
[tool.black]
line-length = 88
+target_version = ['py37', 'py38', 'py39']
I think the idea is pyproject.toml to be static, to avoid all issues with
dynamic behavior in setup.py. It's indeed slightly not ideal to change
this for each Python version, but if you read psf/black#751
<psf/black#751> in the end as long as py37 is
in there, the rest has no effect. There is no changes in formatting for
Python3.7+.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#20294 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABY32P66F2YJRSQ7U2ZDSFLTTJDPJANCNFSM464ISHGQ>
.
--
Guillaume Lemaitre
Scikit-learn @ Inria Foundation
https://glemaitre.github.io/
|
|
Edit: The other PR has already been merged. |
|
Can I just "Squash and merge" this one then? |
Yup, I just did it. One of those rare situations where "rebase and merge" would have worked out nicer than "lets merge two PRS really quickly together". |
Follow up to #20293
This PR applies black with the target_version set.