-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Force root import of const from other components #78014
Conversation
if module.startswith("homeassistant.components.") and module.endswith( | ||
"const" | ||
): | ||
self.add_message("hass-component-root-import", node=node) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is rare, I have only found it on alexa #78013
pylint/plugins/hass_imports.py
Outdated
if node.modname.startswith("homeassistant.components.") and ( | ||
node.modname.endswith(".const") or "const" in node.names | ||
): | ||
self.add_message("hass-component-root-import", node=node) | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is very common
e32a9af
to
5707bd6
Compare
6336bb2
to
c32eff0
Compare
c32eff0
to
040b859
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some last style suggestions
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Proposed change
Based on #77946 (review)
As draft until components are adjustedType of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: