How to pin an import line? #18361
-
I need to pin an import line so that it is at the very top of the file (other imports rely on it). By default Ruff will move it to the "right" place in the imports stack -- is there a way to disable the formatting for that line (or pin it)? |
Beta Was this translation helpful? Give feedback.
Answered by
MichaReiser
May 29, 2025
Replies: 1 comment
-
You can use import foo # isort: skip
import more |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
wsw70
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
#isort: skip
See https://docs.astral.sh/ruff/linter/#action-comments