nwhitehead / pyfluidsynth

Python bindings for FluidSynth
GNU Lesser General Public License v2.1
197 stars 56 forks source link

Ruff rules for whitespace #67

Closed cclauss closed 3 months ago

cclauss commented 3 months ago

% ruff check --select=W --statistics

50  W191    [ ] Indentation contains tabs
 3  W293    [*] Blank line contains whitespace
 2  W291    [*] Trailing whitespace

% 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

if True:
    a = 1

Use instead:

if True:
    a = 1

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".