mirror of
https://github.com/home-assistant/core.git
synced 2026-04-18 07:56:03 +01:00
Improve platforms pylint plugin (#164067)
This commit is contained in:
committed by
GitHub
parent
2cfafc04ce
commit
cb990823cd
@@ -36,7 +36,7 @@ class HassEnforceSortedPlatformsChecker(BaseChecker):
|
||||
"""Check for sorted PLATFORMS const."""
|
||||
if (
|
||||
isinstance(target, nodes.AssignName)
|
||||
and target.name == "PLATFORMS"
|
||||
and target.name in {"PLATFORMS", "_PLATFORMS"}
|
||||
and isinstance(node.value, nodes.List)
|
||||
):
|
||||
platforms = [v.as_string() for v in node.value.elts]
|
||||
|
||||
Reference in New Issue
Block a user