Skip to content

Commit

Permalink
Remove min and max range on line-length JSON schema (#7875)
Browse files Browse the repository at this point in the history
## Summary

This was introduced in #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., SchemaStore/schemastore#3278, which
failed prior to removing the min and max.)
  • Loading branch information
charliermarsh committed Oct 9, 2023
1 parent 7faa431 commit d54cabd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions crates/ruff_workspace/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)]
Expand Down Expand Up @@ -362,7 +362,6 @@ pub struct Options {
line-length = 120
"#
)]
#[cfg_attr(feature = "schemars", schemars(range(min = 1, max = 320)))]
pub line_length: Option<LineLength>,

/// The tabulation size to calculate line length.
Expand Down
4 changes: 1 addition & 3 deletions ruff.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d54cabd

Please sign in to comment.