#1962·isort

isort: skip not respected with add_imports config option

Author: NumerlorCreated Aug 7, 2022Updated Sep 1, 2026

When imports are added through isort's add_imports, existing imports with the isort: skip comment are moved around.

For example with the following config

ini
[settings]
add_imports=import a

these imports

python
import stay_on_top  # isort: skip
import b

are sorted into (and the skip goes into its own section for some reason)

python
import a
import b

import stay_on_top  # isort: skip