-
-
Notifications
You must be signed in to change notification settings - Fork 583
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
Change in isort usage from 4 to 5 is a bit unexpected #1363
Comments
Hi @karrtikr! Thanks for the work on VSCode! The reason is simply that single dash arguments with multiple letters can cause ambiguity: Normally you can chain single dash arguments with one dash. So:
Is the same as Let's say
I wouldn't want to roll back these changes at this point, as I think it's a necessary long term change. That said, like I have done for the other config changes I'm happy to reintroduce them for the rest of the 5.x.x cycle with a warning that they are deprecated and a link to the upgrade guide: https://timothycrosley.github.io/isort/docs/upgrade_guides/5.0.0/#-ac-wl-ws-tc-sp-sp-sl-sg-sd-rr-ot-nlb-nis-ls-le-lbt-lai-fss-fgw-ff-fass-fas-dt-ds-df-cs-ca-af-ac If this would be helpful let me know. Thanks! ~Timothy |
Thanks, makes sense. I'll consult with the team and get back to you soon. |
…Visual Studio Code (issue #1363)
I consulted with the team and this will do for now. We're thinking of showing a warning prompt to users passing all your warning messages. Are there any other warning messages you show regarding isort5? |
Awesome! I've pushed out the improved isort warning reporting for these options in the 5.3.0 release.
From CLI usage, the following other options don't do anything in isort 5 but do provide a warning linking to the 5.0.0 upgrade guide instead of failing: "--recursive", "-rc", "--dont-skip", "-ns", "--apply", "-k", "--keep-direct-and-as". Similarly, from config file or API usage of isort And that should be the extend of it. Thanks! ~Timothy |
That's great. Couple of comments,
|
Thanks for the feedback! I've ensured a minimal number of warnings (one for each type) will be raised and that each will have a code associated with it for easy identification: https://timothycrosley.github.io/isort/docs/warning_and_error_codes/W0500/ This is deployed to PyPI in the 5.3.1 release. Thanks! ~Timothy |
Thanks for including the codes! Should be W0503: 6ed0cd3#r41272904 Any thoughts on the second question I had? |
Thanks for the note! I've pushed out a hot fix release to fix the incorrect code (5.3.2). Yes, sorry meant to answer it earlier! It is possible to identify the other config files that would have been merged, but it would come with a hefty performance penalty on some code bases as it isn't trivial: isort would have to look at every one of the "shared" config file formats it is able to read from, all the way up to root, to see if any of them contain an isort section that would have been merged. Just seeing that the config files isn't enough, since they are used for many tools. |
Cool, that's understandable. The number of users who fall into that category and won't receive any other warning messages are pretty low anyway, so we need not worry 🙂 Thanks again for addressing all the concerns, closing this. |
fixes spack#41096 Bump the minimum version required for isort. This should fix an issue reported on Scientific Linux 7, and due to: PyCQA/isort#1363
Bump the minimum version required for isort. This should fix an issue reported on Scientific Linux 7, and due to: PyCQA/isort#1363
Bump the minimum version required for isort. This should fix an issue reported on Scientific Linux 7, and due to: PyCQA/isort#1363
Bump the minimum version required for isort. This should fix an issue reported on Scientific Linux 7, and due to: PyCQA/isort#1363
Bump the minimum version required for isort. This should fix an issue reported on Scientific Linux 7, and due to: PyCQA/isort#1363
Hi VSCode dev here 👋
isort 4.3.21
isort 5.2.2
For instance, settings path is now specified using
--sp
instead of-sp
. We have a settingpython.sortImports.args
through which users pass arguments to the isort command we run. If we upgrade isort it'll break settings for all those users as many old flags are no longer valid.I was wondering what's the reason for such changes and if it's possible to roll them back.
The text was updated successfully, but these errors were encountered: