1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Use PEP 526 type annotations, add some type hints (#26464)

* Add some more type hints to helpers.event

* Change most type comments to variable types

* Remove some superfluous type hints
This commit is contained in:
Ville Skyttä
2019-09-07 09:48:58 +03:00
committed by GitHub
parent 5b3004c7b0
commit 33e1b44b3a
35 changed files with 152 additions and 174 deletions

View File

@@ -53,7 +53,7 @@ class RegistryEntry:
device_id = attr.ib(type=str, default=None)
config_entry_id = attr.ib(type=str, default=None)
disabled_by = attr.ib(
type=str,
type=Optional[str],
default=None,
validator=attr.validators.in_(
(
@@ -64,7 +64,7 @@ class RegistryEntry:
None,
)
),
) # type: Optional[str]
)
domain = attr.ib(type=str, init=False, repr=False)
@domain.default