Add Self typing (4) [mypy 1.0] (#87601)
This commit is contained in:
parent
f7b39aa4a8
commit
ea4e2ab4aa
11 changed files with 32 additions and 19 deletions
|
@ -7,6 +7,7 @@ import os
|
|||
from pathlib import Path
|
||||
from typing import NamedTuple
|
||||
|
||||
from typing_extensions import Self
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import loader
|
||||
|
@ -54,7 +55,7 @@ class HomeAssistantConfig(OrderedDict):
|
|||
message: str,
|
||||
domain: str | None = None,
|
||||
config: ConfigType | None = None,
|
||||
) -> HomeAssistantConfig:
|
||||
) -> Self:
|
||||
"""Add a single error."""
|
||||
self.errors.append(CheckConfigError(str(message), domain, config))
|
||||
return self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue