From d0174f3127ba966413ce8c80ae27bb014831763f Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 4 Dec 2024 15:44:33 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Martin Hjelmare --- homeassistant/components/backup/manager.py | 4 ++-- homeassistant/components/backup/util.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/backup/manager.py b/homeassistant/components/backup/manager.py index 71577a5ab33aa6..f7b98fdb04cbbd 100644 --- a/homeassistant/components/backup/manager.py +++ b/homeassistant/components/backup/manager.py @@ -43,7 +43,7 @@ LOGGER, ) from .models import AgentBackup, Folder -from .util import read_backup, receieve_file +from .util import read_backup, receive_file @dataclass(frozen=True, kw_only=True, slots=True) @@ -387,7 +387,7 @@ async def async_receive_backup( temp_dir_handler.name, contents.filename or "backup.tar" ) - await receieve_file(self.hass, contents, target_temp_file) + await receive_file(self.hass, contents, target_temp_file) def _copy_and_cleanup( local_file_paths: list[Path], backup: AgentBackup diff --git a/homeassistant/components/backup/util.py b/homeassistant/components/backup/util.py index 4959529809159d..90429d0e617ed9 100644 --- a/homeassistant/components/backup/util.py +++ b/homeassistant/components/backup/util.py @@ -64,7 +64,7 @@ def read_backup(backup_path: Path) -> AgentBackup: ) -async def receieve_file( +async def receive_file( hass: HomeAssistant, contents: aiohttp.BodyPartReader, path: Path ) -> None: """Receive a file from a stream and write it to a file."""