Closed cclauss closed 3 months ago
% ruff check --select=W --statistics
ruff check --select=W --statistics
50 W191 [ ] Indentation contains tabs 3 W293 [*] Blank line contains whitespace 2 W291 [*] Trailing whitespace
% ruff rule W191
ruff rule W191
Derived from the pycodestyle linter.
Checks for indentation that uses tabs.
According to PEP 8, spaces are preferred over tabs (unless used to remain consistent with code that is already indented with tabs).
if True: a = 1
Use instead:
We recommend against using this rule alongside the formatter. The formatter enforces consistent indentation, making the rule redundant.
The rule is also incompatible with the formatter when using format.indent-style="tab".
format.indent-style="tab"
%
ruff check --select=W --statistics
%
ruff rule W191
tab-indentation (W191)
Derived from the pycodestyle linter.
What it does
Checks for indentation that uses tabs.
Why is this bad?
According to PEP 8, spaces are preferred over tabs (unless used to remain consistent with code that is already indented with tabs).
Example
Use instead:
Formatter compatibility
We recommend against using this rule alongside the formatter. The formatter enforces consistent indentation, making the rule redundant.
The rule is also incompatible with the formatter when using
format.indent-style="tab"
.