From 11e0f71787362a26ec12e4a149a2092f7ad6b191 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Wed, 20 Mar 2024 20:40:58 -0400 Subject: [PATCH] Add missing Options references to blank line docs --- .../src/rules/pycodestyle/rules/blank_lines.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs b/crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs index ad21ee7241cf7..f88abe6220e3c 100644 --- a/crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs +++ b/crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs @@ -80,9 +80,9 @@ impl AlwaysFixableViolation for BlankLineBetweenMethods { /// ## Why is this bad? /// PEP 8 recommends exactly two blank lines between top level functions and classes. /// -/// Note: The rule respects the [`lint.isort.lines-after-imports`] setting when determining -/// the required number of blank lines between top-level `import` statements and function or class definitions -/// for compatibility with isort. +/// The rule respects the [`lint.isort.lines-after-imports`] setting when +/// determining the required number of blank lines between top-level `import` +/// statements and function or class definitions for compatibility with isort. /// /// ## Example /// ```python @@ -106,6 +106,9 @@ impl AlwaysFixableViolation for BlankLineBetweenMethods { /// The typing style guide recommends to not use blank lines between classes and functions except to group /// them. That's why this rule is not enabled in typing stub files. /// +/// ## Options +/// - `lint.isort.lines-after-imports` +/// /// ## References /// - [PEP 8](https://peps.python.org/pep-0008/#blank-lines) /// - [Flake 8 rule](https://www.flake8rules.com/rules/E302.html) @@ -165,9 +168,14 @@ impl AlwaysFixableViolation for BlankLinesTopLevel { /// The rule allows at most one blank line in typing stub files in accordance to the typing style guide recommendation. /// /// Note: The rule respects the following `isort` settings when determining the maximum number of blank lines allowed between two statements: +/// /// * [`lint.isort.lines-after-imports`]: For top-level statements directly following an import statement. /// * [`lint.isort.lines-between-types`]: For `import` statements directly following a `from ... import ...` statement or vice versa. /// +/// ## Options +/// - `lint.isort.lines-after-imports` +/// - `lint.isort.lines-between-types` +/// /// ## References /// - [PEP 8](https://peps.python.org/pep-0008/#blank-lines) /// - [Flake 8 rule](https://www.flake8rules.com/rules/E303.html)