Allow `NURSERY` in JSON Schema (#7374)

## Summary

At some point, we removed these so that they wouldn't be autocompleted
for users, since we wanted to discourage usage of `ALL`. But given that
they're valid values, I think that was a bad idea -- it leads to an even
more confusing experience whereby JSON Schema validators tell you that
you have an error, when you don't.

Closes https://github.com/astral-sh/ruff/issues/7261.
This commit is contained in:
Charlie Marsh 2023-09-14 14:09:35 -04:00 committed by GitHub
parent b9bb6bf780
commit 21539f1663
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -254,8 +254,9 @@ mod schema {
instance_type: Some(InstanceType::String.into()),
enum_values: Some(
[
// Include the non-standard "ALL" selector.
// Include the non-standard "ALL" and "NURSERY" selectors.
"ALL".to_string(),
"NURSERY".to_string(),
// Include the legacy "C" and "T" selectors.
"C".to_string(),
"T".to_string(),

1
ruff.schema.json generated
View File

@ -2161,6 +2161,7 @@
"NPY001",
"NPY002",
"NPY003",
"NURSERY",
"PD",
"PD0",
"PD00",