Add Self typing (4) [mypy 1.0] (#87601)

This commit is contained in:
Marc Mueller 2023-02-07 05:30:22 +01:00 committed by GitHub
parent f7b39aa4a8
commit ea4e2ab4aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 32 additions and 19 deletions

View file

@ -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