mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-03 15:15:33 +00:00
Remove min and max range on line-length
JSON schema (#7875)
## Summary This was introduced in https://github.com/astral-sh/ruff/pull/7412, but SchemaStore doesn't accept it. I manually edited the JSON schema last time, then tried to fix this, then gave up -- so removing for now. (See, e.g., https://github.com/SchemaStore/schemastore/pull/3278, which failed prior to removing the min and max.)
This commit is contained in:
parent
7faa43108f
commit
d54cabd276
2 changed files with 3 additions and 6 deletions
|
@ -2,12 +2,11 @@ use std::collections::BTreeSet;
|
||||||
use std::hash::BuildHasherDefault;
|
use std::hash::BuildHasherDefault;
|
||||||
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use ruff_formatter::IndentStyle;
|
|
||||||
use rustc_hash::{FxHashMap, FxHashSet};
|
use rustc_hash::{FxHashMap, FxHashSet};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use strum::IntoEnumIterator;
|
use strum::IntoEnumIterator;
|
||||||
|
|
||||||
use crate::options_base::{OptionsMetadata, Visit};
|
use ruff_formatter::IndentStyle;
|
||||||
use ruff_linter::line_width::{LineLength, TabSize};
|
use ruff_linter::line_width::{LineLength, TabSize};
|
||||||
use ruff_linter::rules::flake8_pytest_style::settings::SettingsError;
|
use ruff_linter::rules::flake8_pytest_style::settings::SettingsError;
|
||||||
use ruff_linter::rules::flake8_pytest_style::types;
|
use ruff_linter::rules::flake8_pytest_style::types;
|
||||||
|
@ -30,6 +29,7 @@ use ruff_linter::{warn_user_once, RuleSelector};
|
||||||
use ruff_macros::{CombineOptions, OptionsMetadata};
|
use ruff_macros::{CombineOptions, OptionsMetadata};
|
||||||
use ruff_python_formatter::QuoteStyle;
|
use ruff_python_formatter::QuoteStyle;
|
||||||
|
|
||||||
|
use crate::options_base::{OptionsMetadata, Visit};
|
||||||
use crate::settings::LineEnding;
|
use crate::settings::LineEnding;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq, Default, OptionsMetadata, Serialize, Deserialize)]
|
#[derive(Debug, PartialEq, Eq, Default, OptionsMetadata, Serialize, Deserialize)]
|
||||||
|
@ -362,7 +362,6 @@ pub struct Options {
|
||||||
line-length = 120
|
line-length = 120
|
||||||
"#
|
"#
|
||||||
)]
|
)]
|
||||||
#[cfg_attr(feature = "schemars", schemars(range(min = 1, max = 320)))]
|
|
||||||
pub line_length: Option<LineLength>,
|
pub line_length: Option<LineLength>,
|
||||||
|
|
||||||
/// The tabulation size to calculate line length.
|
/// The tabulation size to calculate line length.
|
||||||
|
|
4
ruff.schema.json
generated
4
ruff.schema.json
generated
|
@ -392,9 +392,7 @@
|
||||||
{
|
{
|
||||||
"type": "null"
|
"type": "null"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"maximum": 320.0,
|
|
||||||
"minimum": 1.0
|
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue