-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python Refactor: Sort Imports provides inaccurate Error message when skipping __init__.py
#2435
Comments
Since the error message isn't coming from us, this is considered an upstream bug. But I will leave this open to remind us to update to a new release of isort once it comes out. |
@brettcannon could the isort version be upgraded so the default value of the argument does not include |
@AndreasBackx no clue if there's a fix, but we can look at upgrading the copy we pull down. |
I too seem to always get the message "Error: Invalid patch string: Skipped 1 files" when running
|
@AndreasBackx @dustinmichels we just upgraded isort in our insiders build of the extension. Could either of you give it a try and see if it fixes your problem? |
@brettcannon how could I test that insiders build? I cannot find any information on this repo regarding that. |
That seems to work for me! |
@brettcannon I guess I skimmed over it, thinking it was for developers. I can test it when I have the time Friday if you still want me to. Though I think it's a trivial update and if it works for @dustinmichels, it should be fine. |
@AndreasBackx closing as fixed then! |
Environment data
Actual behavior
"Python Refactor: Sort Imports" will skip
__init__.py
file, and produce an error of "Error: Invalid patch string: Skipped 1 files"Expected behavior
Should sort the file (not skipping it), or produce an informative instruction about skipping files, not an Error of "Invalid patch string".
Steps to reproduce:
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
)Discussion
Upstream
isort
have already update the default setting to remove skipping"__init__.py"
(but not release yet):PyCQA/isort@985fd9a#diff-57121582b6fc41e2d3a0776d1ddc59d9L50
This use case can be workaround by appending
"-ns", "__init__.py"
to"python.sortImports.args"
, but the problem of inaccurate error message may still occur when user define other ignored files.The text was updated successfully, but these errors were encountered: