From 6541d25bf5d9a44e09013c84058677cfa673d119 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 20 Oct 2026 18:00:22 +0200 Subject: [PATCH] Define __init__ before other methods in OneDrive for Business (#187558) Co-authored-by: Claude --- .../components/onedrive_for_business/config_flow.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/onedrive_for_business/config_flow.py b/homeassistant/components/onedrive_for_business/config_flow.py index fcf1dae2b91a..303a21a995fb 100644 --- a/homeassistant/components/onedrive_for_business/config_flow.py +++ b/homeassistant/components/onedrive_for_business/config_flow.py @@ -38,6 +38,11 @@ class OneDriveForBusinessConfigFlow(AbstractOAuth2FlowHandler, domain=DOMAIN): client: OneDriveClient drive: Drive + def __init__(self) -> None: + """Initialize the OneDrive config flow.""" + super().__init__() + self._data: dict[str, Any] = {} + @property @override def logger(self) -> logging.Logger: @@ -50,11 +55,6 @@ class OneDriveForBusinessConfigFlow(AbstractOAuth2FlowHandler, domain=DOMAIN): """Extra data that needs to be appended to the authorize url.""" return {"scope": " ".join(OAUTH_SCOPES)} - def __init__(self) -> None: - """Initialize the OneDrive config flow.""" - super().__init__() - self._data: dict[str, Any] = {} - @override async def async_step_user( self, user_input: dict[str, Any] | None = None