-
Notifications
You must be signed in to change notification settings - Fork 767
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
Improve auto-import sorting rules to be better compatible with isort #1675
Comments
Are you looking for us to read an Note that our current behavior is similar to TypeScript's, where it inserts in a specific location, but then it's up to a formatter/linter to change it on save. |
I would guess that most developers use the default settings for |
If that's the default in isort, then yeah, I think we should make it match. The docs seem to imply that it's on by default. |
Obviously reading the config would be great, but that is not really necessary. |
it should be fixed in 2021.8.2 released today (2021.8.19) |
Pylance:
v2021.8.1
--
It would be great if
Auto-Import
could use the same default sorting rules asisort
when adding a new import. That way theSort Imports
command wouldn't reorder them. In particular full support for theorder-by-type
option, i.e.CONSTANT_VARIABLE
CamelCaseClass
variable_or_function
https://pycqa.github.io/isort/docs/configuration/options.html#order-by-type
Current Example
Here
BinarySensorEntity
andBinarySensorEntityDescription
should be put afterDEVICE_CLASS_MOTION
.The text was updated successfully, but these errors were encountered: