mirror of
https://github.com/home-assistant/core.git
synced 2025-11-17 23:10:28 +00:00
Simplify unnecessary re match.groups()[0] calls (#147909)
This commit is contained in:
@@ -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__"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user