mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Type scaffold PLATFORMS (#55699)
* Added template base type Proposition to add typing, as pre-commit test on newly created integrations fails on it automatically: ``` homeassistant/components/<my_integration>/__init__.py:11: error: Need type annotation for "PLATFORMS" (hint: "PLATFORMS: List[<type>] = ...") [var-annotated] Found 1 error in 1 file (checked 4 source files) ``` I believe there shouldn't be other type than text, hence the proposition. * Apply suggestions from code review Co-authored-by: Joakim Sørensen <hi@ludeeus.dev> Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
This commit is contained in:
parent
a54b9502ef
commit
501e7c84be
@ -8,7 +8,7 @@ from .const import DOMAIN
|
||||
|
||||
# TODO List the platforms that you want to support.
|
||||
# For your initial PR, limit it to 1 platform.
|
||||
PLATFORMS = ["light"]
|
||||
PLATFORMS: list[str] = ["light"]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
|
Loading…
x
Reference in New Issue
Block a user