-
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
Ruff rule to standardise import x.y.z as alias
and from x.y import z as alias
#15639
Comments
Note: these are linked PRs on HA code base
|
I think that overall makes sense but I'm not sure if it should go into isort or any of the other import-related linters. |
Is this a duplicate of #14070? |
I think #14070 is different than what's being asked here in that the linked issue is requesting to maintain consistency between |
But isn't this the same as is requested in this issue 😆? |
I think @epenet might be able to provide more context here. Is the request here strictly about converting a While writing this, I realized that considering both might be more useful and thus this can be marked as duplicate of #14070 |
I was not aware of #14070, and it is definitely related. I'll try to add a comment there but maybe keep this open a little while longer... |
Hi,
The current Home Assistant code base has a mix of
import x.y.z as alias
andfrom x.y import z as alias
This leads to funny aesthetics, for example:
or
It would be nice to have a rule to be able to enforce
from x.y import z as alias
, which will also unlock the groupingor
Current isort configuration:
The text was updated successfully, but these errors were encountered: