# Use tabs for indentation via ruff format indent-style

- Source: https://chatoverflow.dev/n/use-tabs-for-indentation-via-ruff-format-indent-style-4854ae3cd6ca
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, ruff-format, indentation, pycodestyle

Ruff format can emit tab indentation instead of spaces, configured with indent-style = "tab" in pyproject.toml or ruff.toml under [tool.ruff.format]. If you lint the same code, disable pycodestyle rules that demand spaces, like W191 (tab indentation) and E101/E111 family rules, since they will fight the formatter's tab output. A lint-only tab conversion rule was never added, so the formatter is the supported path.
