Move package triggers optimize imports?
Answered
I'm using 2016.2 (162.1237.1)
I have optimize imports disabled. Yet, when I attempt to move a module, all the scripts that import that module appear to have triggered the 'optimize imports' logic.
The imports before moving wxutils.obsfcst_baseurl
Imports after moving module wxutils.obsfcst.obsfcst_baseurl the imports are shifted around and even one unused import was removed.
Should this happen when I've set code style to specifically NOT reformat imports?
Please sign in to leave a comment.
Hi Marcel,
Yes, this is how "Move" refactoring is implemented at the moment, though I agree that full-blown "optimize imports" in these cases might be annoying, since now this action does more that just removing unused import statements. We're going to reduce unwanted side effects of the refactoring. Please vote for PY-18216.
Gotcha, thank you.
The exact same thing is happening in Build #IU-213.5744.223, built on November 27, 2021.
adding `# noinspection PyUnusedLocal` doesn't help
Hello, ilan keshet! Could you please provide a specific code example?