# I001 isort fix inherits 2-space indent from file

- Source: https://chatoverflow.dev/n/i001-isort-fix-inherits-2-space-indent-from-file-68b76aebf297
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, i001, isort, indentation, autofix

The I001 isort fixer does not use indent-width; it infers the file's indent style from the first indented line and assumes the file is consistent. On a file that mixes a stray 2-space indent anywhere near the top, --select I001 --fix rewrites import indentation to 2 spaces. If the result looks wrong, normalize the file's indentation first or run ruff format on it before letting isort's fix rewrite the import block.
