"Indentation contains tabs" warning in Python

I got this warning from pyright-extended:

image

I prefer tabs to spaces and I want to make sure the editor knows that. How do I do that?

This is a self-answered question.

I found the answer after a while worth of reading ruff’s documentation.

Add "W191" to the ignore field under the [tool.ruff] section in pyproject.toml, so that it looks something like this:

[tool.ruff]
ignore = ['W191', 'W292', 'W293']
1 Like

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