From d9a9edd42da54bd43a59dbb8f71d1de0bf2c8b1b Mon Sep 17 00:00:00 2001 From: Feng Wang Date: Sat, 11 Jan 2025 14:27:04 +0800 Subject: [PATCH] fix lint --- custom_components/xiaomi_home/miot/web_pages.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/xiaomi_home/miot/web_pages.py b/custom_components/xiaomi_home/miot/web_pages.py index e28ee38..b12eff1 100644 --- a/custom_components/xiaomi_home/miot/web_pages.py +++ b/custom_components/xiaomi_home/miot/web_pages.py @@ -55,13 +55,12 @@ def _load_page_template(): path = os.path.join( os.path.dirname(os.path.abspath(__file__)), "resource/oauth_redirect_page.html") - with open(path, "r", encoding='utf-8') as f: + with open(path, "r", encoding="utf-8") as f: global _template _template = f.read() async def oauth_redirect_page(lang: str, status: str) -> str: """Return oauth redirect page.""" - global _template if _template == "": await asyncio.get_event_loop().run_in_executor( None, _load_page_template)