Skip to content

Commit 3d2dca5

Browse files
authored
Adjust scripts for compatibility with Python 3.14 (home-assistant#146774)
1 parent cdb2b40 commit 3d2dca5

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

homeassistant/scripts/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,8 @@ def run(args: list[str]) -> int:
4646

4747
config_dir = extract_config_dir()
4848

49-
loop = asyncio.get_event_loop()
50-
5149
if not is_virtual_env():
52-
loop.run_until_complete(async_mount_local_lib_path(config_dir))
50+
asyncio.run(async_mount_local_lib_path(config_dir))
5351

5452
_pip_kwargs = pip_kwargs(config_dir)
5553

tests/scripts/test_check_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def mock_is_file():
4343
"""Mock is_file."""
4444
# All files exist except for the old entity registry file
4545
with patch(
46-
"os.path.isfile", lambda path: not path.endswith("entity_registry.yaml")
46+
"os.path.isfile", lambda path: not str(path).endswith("entity_registry.yaml")
4747
):
4848
yield
4949

0 commit comments

Comments
 (0)