Indentation warning appearing in python project despite ignore = ['W291', 'W292', 'W293']

ignore = ['W291', 'W292', 'W293']

The line above, located in the [tool.ruff] section of pyproject.toml is supposed to ignore the “indentation contains spaces” warning and prevent it from being displayed, but the warning (and its squiggly lines) is still appearing in editor.

How do I fix this?

(full [tool.ruff] section of pyproject.toml)

[tool.ruff]
# https://beta.ruff.rs/docs/configuration/
select = ['E', 'W', 'F', 'I', 'B', 'C4', 'ARG', 'SIM']
ignore = ['W291', 'W292', 'W293']
1 Like

Have you tried rebooting the Repl after making those changes? (Run kill 1 in the Shell)

3 Likes

None of the rules ignored are the rule for the warning you are getting. Also, I believe the warning is “indentation contains tabs” and not “indentation contains spaces”.
The rule you are probably looking for is W191.

ignore = ["W191", "W291", "W292", "W293"]
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.