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.