Simplify unnecessary re match.groups()[0] calls (#147909)

This commit is contained in:
Ville Skyttä
2025-07-02 12:12:26 +00:00
committed by GitHub
parent f10fcde6d8
commit ff76017ba6
4 changed files with 5 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ def _get_module_platform(module_name: str) -> str | None:
# Or `homeassistant.components.<component>.<platform>`
return None
platform = module_match.groups()[0]
platform = module_match.group(1)
return platform.lstrip(".") if platform else "__init__"