Environment data
- VS Code version: 1.34.0
- Extension version (available under the Extensions sidebar): 2019.5.17059 (28 May 2019)
- OS and version: macOS 10.14.4
- Python version: 3.6.7 (miniconda)
Issue
I added
"editor.codeActionsOnSave": { "source.organizeImports": true }
to my user settings to sort imports with isort. I'm also using black as a code formatter. On multiline imports these two tools format imports very differently, leading to alternating formatting and jumping code from one save to the next as shown in this gif.

I was able to prevent this by configuring isort to use black's formatting by adding
[isort]
multi_line_output = 3
include_trailing_comma = True
to my setup.cfg as indicated in the comments of this black commit.
Now, the file is stable if I repeatedly save it without changes in between. But if I modify the file and then save, the imports briefly flash to isort formatting before reverting to black formatting. So unlike before, the final result is now always black formatting but there's jumping code every time I modify and save.
This seems to suggest that isort is still being run by VS Code with its default settings when the formatOnSave callbacks are triggered. Is there any way to respect the setup.cfg settings in the isort callback?
Additional Info
Related Issue: #2301
Environment data
Issue
I added
to my user settings to sort imports with
isort. I'm also usingblackas a code formatter. On multiline imports these two tools format imports very differently, leading to alternating formatting and jumping code from one save to the next as shown in this gif.I was able to prevent this by configuring
isortto useblack's formatting by adding[isort] multi_line_output = 3 include_trailing_comma = Trueto my
setup.cfgas indicated in the comments of this black commit.Now, the file is stable if I repeatedly save it without changes in between. But if I modify the file and then save, the imports briefly flash to
isortformatting before reverting toblackformatting. So unlike before, the final result is now alwaysblackformatting but there's jumping code every time I modify and save.This seems to suggest that
isortis still being run by VS Code with its default settings when theformatOnSavecallbacks are triggered. Is there any way to respect thesetup.cfgsettings in theisortcallback?Additional Info
Related Issue: #2301