-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat: add black to pyproject.toml #3559
Conversation
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Thanks for the PR! This section of the codebase is owned by @madskristensen and |
for more information, see https://pre-commit.ci
@hyperupcall thoughts? |
Thanks for doing this!
As a maintainer of Black I'd like to endorse this decision. We'll probably deprecate these nonstandard ways to configure the project in our documentation and possibly also at runtime. If anyone complains to SchemaStore about it, feel free to send them to our repo instead. |
In general, I support fixing schemas to not exclude shapes or values that are implementation details. But since usage is of either is relatively rare and it will be deprecated in feature versions of black, then I don't think it's necessary to include support for it in the schema upfront. If someone complains, I wouldn't be opposed to a MR to fix it, if it doesn't complicate the schema too much.
Noted 👍 |
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.
LGTM!
@henryiii Also for the future, I would recommend putting "partials" in the missingCatalogUrl
property of schema-validation.json
(not in catalog.json
). Don't worry about it in this PR though, I'm making fixes for it in all the places via PR #3556 (see commit 4b4a4b4
(#3556) for details). I wish I saw the use of that property sooner.
FYI, here's the top 20 most popular tool sections based on all pyproject.toml's on PyPI, with my personal notes on how hard it might be to add the missing ones:
I'll probably do tox next, since it's literally one item (everything goes in a string in
How someone puts
|
That list is very useful - I have put that into an issue #3564 |
Based off upstream addition in psf/black#4181 (comment) (plus a small bugfix I'll also push there).
Note that this is idealized, that is, if a type is a bool, it expects a bool. Due to the way this was implemented in black, strings are supported everywhere, ints also can be used for bools, and
_
is equivalent to-
. Tightening this is proposed in psf/black#4178, and of the 23,128 pyproject.toml's on PyPI that containtool.black
, only about 2% use weird types and about 5% use_
instead of-
. Since these are just allowed by implementation details, and are never shown in docs, etc, I think it's fine to leave this simple and only support the "correct" way to do things? If not, I can add this (just for the SchemaStore version). At least for reasonable/common versions. Technically, a mix like this is valid:But upstream doesn't support it in the embedded schema and I'd rather not here as well if that's okay.
Happy to rebase after #3556 if needed.