From c319414e54d03b64335c75e2df58bb3a0cd25e7e Mon Sep 17 00:00:00 2001 From: Dhruv Manilawala Date: Fri, 16 Aug 2024 20:57:36 +0530 Subject: [PATCH] Ignore blank line rules for docs formatting (#12934) ## Summary fixes: #12933 ## Test Plan `python scripts/check_docs_formatted.py --generate-docs` --- .../src/rules/pydocstyle/rules/blank_before_after_class.rs | 2 ++ scripts/check_docs_formatted.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/crates/ruff_linter/src/rules/pydocstyle/rules/blank_before_after_class.rs b/crates/ruff_linter/src/rules/pydocstyle/rules/blank_before_after_class.rs index 26149fdfb4428..465ba4964b0fd 100644 --- a/crates/ruff_linter/src/rules/pydocstyle/rules/blank_before_after_class.rs +++ b/crates/ruff_linter/src/rules/pydocstyle/rules/blank_before_after_class.rs @@ -34,6 +34,7 @@ use crate::registry::Rule; /// /// ```python /// class PhotoMetadata: +/// /// """Metadata about a photo.""" /// ``` /// @@ -125,6 +126,7 @@ impl AlwaysFixableViolation for OneBlankLineAfterClass { /// /// ```python /// class PhotoMetadata: +/// /// """Metadata about a photo.""" /// ``` /// diff --git a/scripts/check_docs_formatted.py b/scripts/check_docs_formatted.py index 1a904711f0cfe..64d3dbe146e53 100755 --- a/scripts/check_docs_formatted.py +++ b/scripts/check_docs_formatted.py @@ -34,6 +34,7 @@ "bad-quotes-inline-string", "bad-quotes-multiline-string", "blank-line-after-decorator", + "blank-line-before-class", "blank-line-between-methods", "blank-lines-after-function-or-class", "blank-lines-before-nested-definition", @@ -67,6 +68,7 @@ "no-space-after-inline-comment", "non-empty-stub-body", "one-blank-line-after-class", + "one-blank-line-before-class", "over-indentation", "over-indented", "pass-statement-stub-body",