From 3b5ac12912dc199156eb2a40d929e32e29ac8ab5 Mon Sep 17 00:00:00 2001 From: "sapunyangkut 302607731+sapunyangkut@users.noreply.github.com[0]" Date: Tue, 14 Jul 2026 11:42:21 +0800 Subject: [PATCH] Document temporary .isorted files --- docs/quick_start/2.-cli.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/quick_start/2.-cli.md b/docs/quick_start/2.-cli.md index 4f8c36c38..581b10f05 100644 --- a/docs/quick_start/2.-cli.md +++ b/docs/quick_start/2.-cli.md @@ -25,6 +25,20 @@ Finally, isort can just as easily be ran against individual source files. Simply +## Temporary Files + +By default, when isort processes a source file, it writes the result to a +sibling temporary file by appending `.isorted` to the source filename. If the +content changes, this temporary file replaces the original. isort removes the +temporary file when processing finishes and also attempts cleanup if sorting +raises an exception. + +If the process terminates before cleanup runs, the temporary file may remain. +It can be removed after isort has stopped. Projects where abrupt termination is +possible can ignore `*.isorted` files, or use the +[`--overwrite-in-place`](../configuration/options.md#overwrite-in-place) +option to avoid creating them, with a performance and memory usage penalty. + ## Multiple Projects Running a single isort command across multiple projects, or source files spanning multiple projects, is highly discouraged. Instead it is recommended that an isort process (or command) is ran for each project independently. This is because isort creates an immutable config for each CLI instance.