Skip to content

Commit

Permalink
fix(schema): restore limit on line-length
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Oct 10, 2023
1 parent d54cabd commit f8aa992
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/ruff_linter/src/line_width.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ use ruff_text_size::TextSize;
/// The allowed range of values is 1..=320
#[derive(Clone, Copy, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct LineLength(NonZeroU16);
pub struct LineLength(
#[cfg_attr(feature = "schemars", schemars(range(min = 1, max = 320)))]
NonZeroU16
);

impl LineLength {
/// Maximum allowed value for a valid [`LineLength`]
Expand Down
1 change: 1 addition & 0 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 f8aa992

Please sign in to comment.