From 71649f208373287ab8b3276aff3206a391744b0a Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 9 Oct 2023 14:44:38 -0400 Subject: [PATCH] Remove min and max range on line-length JSON schema --- crates/ruff_workspace/src/options.rs | 5 ++--- ruff.schema.json | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/ruff_workspace/src/options.rs b/crates/ruff_workspace/src/options.rs index 1a79575c52ae4..d90219818cbf0 100644 --- a/crates/ruff_workspace/src/options.rs +++ b/crates/ruff_workspace/src/options.rs @@ -2,12 +2,11 @@ use std::collections::BTreeSet; use std::hash::BuildHasherDefault; use regex::Regex; -use ruff_formatter::IndentStyle; use rustc_hash::{FxHashMap, FxHashSet}; use serde::{Deserialize, Serialize}; use strum::IntoEnumIterator; -use crate::options_base::{OptionsMetadata, Visit}; +use ruff_formatter::IndentStyle; use ruff_linter::line_width::{LineLength, TabSize}; use ruff_linter::rules::flake8_pytest_style::settings::SettingsError; 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_python_formatter::QuoteStyle; +use crate::options_base::{OptionsMetadata, Visit}; use crate::settings::LineEnding; #[derive(Debug, PartialEq, Eq, Default, OptionsMetadata, Serialize, Deserialize)] @@ -362,7 +362,6 @@ pub struct Options { line-length = 120 "# )] - #[cfg_attr(feature = "schemars", schemars(range(min = 1, max = 320)))] pub line_length: Option, /// The tabulation size to calculate line length. diff --git a/ruff.schema.json b/ruff.schema.json index 0149b046ee775..f0ead38dfb488 100644 --- a/ruff.schema.json +++ b/ruff.schema.json @@ -392,9 +392,7 @@ { "type": "null" } - ], - "maximum": 320.0, - "minimum": 1.0 + ] }, "lint": { "anyOf": [