From 24899efe50bb85485a21a731a9690f82ce948760 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Fri, 17 May 2024 17:49:16 -0400 Subject: [PATCH] Remove example from `tab-indentation` (#11462) ## Summary I think the example is more confusing than helpful, since there's no visual difference between the tab and space here (even if it rendered properly). Closes https://github.com/astral-sh/ruff/issues/11460#issuecomment-2118397278. --- .../src/rules/pycodestyle/rules/tab_indentation.rs | 12 ------------ scripts/check_docs_formatted.py | 1 - 2 files changed, 13 deletions(-) diff --git a/crates/ruff_linter/src/rules/pycodestyle/rules/tab_indentation.rs b/crates/ruff_linter/src/rules/pycodestyle/rules/tab_indentation.rs index d0bda797a1757..38e40128a384b 100644 --- a/crates/ruff_linter/src/rules/pycodestyle/rules/tab_indentation.rs +++ b/crates/ruff_linter/src/rules/pycodestyle/rules/tab_indentation.rs @@ -11,18 +11,6 @@ use ruff_text_size::{TextRange, TextSize}; /// According to [PEP 8], spaces are preferred over tabs (unless used to remain /// consistent with code that is already indented with tabs). /// -/// ## Example -/// ```python -/// if True: -/// a = 1 -/// ``` -/// -/// Use instead: -/// ```python -/// if True: -/// a = 1 -/// ``` -/// /// ## Formatter compatibility /// We recommend against using this rule alongside the [formatter]. The /// formatter enforces consistent indentation, making the rule redundant. diff --git a/scripts/check_docs_formatted.py b/scripts/check_docs_formatted.py index 979aee658a361..208cf6ea108e4 100755 --- a/scripts/check_docs_formatted.py +++ b/scripts/check_docs_formatted.py @@ -74,7 +74,6 @@ "redundant-backslash", "shebang-leading-whitespace", "surrounding-whitespace", - "tab-indentation", "too-few-spaces-before-inline-comment", "too-many-blank-lines", "too-many-boolean-expressions",