Skip to content

Commit

Permalink
Add missing Options references to blank line docs (#10498)
Browse files Browse the repository at this point in the history
See: #10427.
  • Loading branch information
charliermarsh committed Mar 21, 2024
1 parent a5f41e8 commit 9aded02
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9aded02

Please sign in to comment.