From 776725869677d83b0fb57d830137b602107db200 Mon Sep 17 00:00:00 2001 From: Jeff Rescignano Date: Wed, 30 Mar 2022 14:41:34 -0400 Subject: [PATCH] Change sharkiqpy to sharkiq (#68864) --- CODEOWNERS | 4 ++-- homeassistant/components/sharkiq/__init__.py | 2 +- homeassistant/components/sharkiq/config_flow.py | 2 +- homeassistant/components/sharkiq/manifest.json | 6 +++--- homeassistant/components/sharkiq/update_coordinator.py | 2 +- homeassistant/components/sharkiq/vacuum.py | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/sharkiq/test_config_flow.py | 8 ++++---- tests/components/sharkiq/test_vacuum.py | 6 +++--- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index adbfd0205e5..d0f03e31e0e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -889,8 +889,8 @@ build.json @home-assistant/supervisor /tests/components/sentry/ @dcramer @frenck /homeassistant/components/serial/ @fabaff /homeassistant/components/seven_segments/ @fabaff -/homeassistant/components/sharkiq/ @ajmarks -/tests/components/sharkiq/ @ajmarks +/homeassistant/components/sharkiq/ @JeffResc @funkybunch @AritroSaha10 +/tests/components/sharkiq/ @JeffResc @funkybunch @AritroSaha10 /homeassistant/components/shell_command/ @home-assistant/core /tests/components/shell_command/ @home-assistant/core /homeassistant/components/shelly/ @balloob @bieniu @thecode @chemelli74 diff --git a/homeassistant/components/sharkiq/__init__.py b/homeassistant/components/sharkiq/__init__.py index 172ad6722ea..aad05652b0b 100644 --- a/homeassistant/components/sharkiq/__init__.py +++ b/homeassistant/components/sharkiq/__init__.py @@ -3,7 +3,7 @@ import asyncio from contextlib import suppress import async_timeout -from sharkiqpy import ( +from sharkiq import ( AylaApi, SharkIqAuthError, SharkIqAuthExpiringError, diff --git a/homeassistant/components/sharkiq/config_flow.py b/homeassistant/components/sharkiq/config_flow.py index a2d143e3e28..4875e2b25e1 100644 --- a/homeassistant/components/sharkiq/config_flow.py +++ b/homeassistant/components/sharkiq/config_flow.py @@ -5,7 +5,7 @@ import asyncio import aiohttp import async_timeout -from sharkiqpy import SharkIqAuthError, get_ayla_api +from sharkiq import SharkIqAuthError, get_ayla_api import voluptuous as vol from homeassistant import config_entries, core, exceptions diff --git a/homeassistant/components/sharkiq/manifest.json b/homeassistant/components/sharkiq/manifest.json index 0875609db1e..d1896af3f6c 100644 --- a/homeassistant/components/sharkiq/manifest.json +++ b/homeassistant/components/sharkiq/manifest.json @@ -3,8 +3,8 @@ "name": "Shark IQ", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/sharkiq", - "requirements": ["sharkiqpy==0.1.8"], - "codeowners": ["@ajmarks"], + "requirements": ["sharkiq==0.0.1"], + "codeowners": ["@JeffResc", "@funkybunch", "@AritroSaha10"], "iot_class": "cloud_polling", - "loggers": ["sharkiqpy"] + "loggers": ["sharkiq"] } diff --git a/homeassistant/components/sharkiq/update_coordinator.py b/homeassistant/components/sharkiq/update_coordinator.py index 08e383a7437..41853ad4e41 100644 --- a/homeassistant/components/sharkiq/update_coordinator.py +++ b/homeassistant/components/sharkiq/update_coordinator.py @@ -4,7 +4,7 @@ from __future__ import annotations import asyncio from async_timeout import timeout -from sharkiqpy import ( +from sharkiq import ( AylaApi, SharkIqAuthError, SharkIqAuthExpiringError, diff --git a/homeassistant/components/sharkiq/vacuum.py b/homeassistant/components/sharkiq/vacuum.py index 351c0458754..cb7ec6da2d9 100644 --- a/homeassistant/components/sharkiq/vacuum.py +++ b/homeassistant/components/sharkiq/vacuum.py @@ -3,7 +3,7 @@ from __future__ import annotations from collections.abc import Iterable -from sharkiqpy import OperatingModes, PowerModes, Properties, SharkIqVacuum +from sharkiq import OperatingModes, PowerModes, Properties, SharkIqVacuum from homeassistant.components.vacuum import ( STATE_CLEANING, diff --git a/requirements_all.txt b/requirements_all.txt index 419bda72904..afafa76d939 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2123,7 +2123,7 @@ sense_energy==0.10.4 sentry-sdk==1.5.8 # homeassistant.components.sharkiq -sharkiqpy==0.1.8 +sharkiq==0.0.1 # homeassistant.components.aquostv sharp_aquos_rc==0.3.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index cd1f07c920d..d4fb88a4d77 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1372,7 +1372,7 @@ sense_energy==0.10.4 sentry-sdk==1.5.8 # homeassistant.components.sharkiq -sharkiqpy==0.1.8 +sharkiq==0.0.1 # homeassistant.components.sighthound simplehound==0.3 diff --git a/tests/components/sharkiq/test_config_flow.py b/tests/components/sharkiq/test_config_flow.py index ef69f793d7c..8bd92b39a4e 100644 --- a/tests/components/sharkiq/test_config_flow.py +++ b/tests/components/sharkiq/test_config_flow.py @@ -3,7 +3,7 @@ from unittest.mock import patch import aiohttp import pytest -from sharkiqpy import AylaApi, SharkIqAuthError +from sharkiq import AylaApi, SharkIqAuthError from homeassistant import config_entries from homeassistant.components.sharkiq.const import DOMAIN @@ -23,7 +23,7 @@ async def test_form(hass): assert result["type"] == "form" assert result["errors"] == {} - with patch("sharkiqpy.AylaApi.async_sign_in", return_value=True), patch( + with patch("sharkiq.AylaApi.async_sign_in", return_value=True), patch( "homeassistant.components.sharkiq.async_setup_entry", return_value=True, ) as mock_setup_entry: @@ -68,7 +68,7 @@ async def test_form_error(hass: HomeAssistant, exc: Exception, base_error: str): async def test_reauth_success(hass: HomeAssistant): """Test reauth flow.""" - with patch("sharkiqpy.AylaApi.async_sign_in", return_value=True): + with patch("sharkiq.AylaApi.async_sign_in", return_value=True): mock_config = MockConfigEntry(domain=DOMAIN, unique_id=UNIQUE_ID, data=CONFIG) mock_config.add_to_hass(hass) @@ -98,7 +98,7 @@ async def test_reauth( msg: str, ): """Test reauth failures.""" - with patch("sharkiqpy.AylaApi.async_sign_in", side_effect=side_effect): + with patch("sharkiq.AylaApi.async_sign_in", side_effect=side_effect): result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": config_entries.SOURCE_REAUTH, "unique_id": UNIQUE_ID}, diff --git a/tests/components/sharkiq/test_vacuum.py b/tests/components/sharkiq/test_vacuum.py index 5080c379108..ac6ab3274cb 100644 --- a/tests/components/sharkiq/test_vacuum.py +++ b/tests/components/sharkiq/test_vacuum.py @@ -8,7 +8,7 @@ from typing import Any from unittest.mock import patch import pytest -from sharkiqpy import AylaApi, SharkIqAuthError, SharkIqNotAuthedError, SharkIqVacuum +from sharkiq import AylaApi, SharkIqAuthError, SharkIqNotAuthedError, SharkIqVacuum from homeassistant.components.homeassistant import SERVICE_UPDATE_ENTITY from homeassistant.components.sharkiq import DOMAIN @@ -118,7 +118,7 @@ class MockShark(SharkIqVacuum): @pytest.fixture(autouse=True) -@patch("sharkiqpy.ayla_api.AylaApi", MockAyla) +@patch("sharkiq.ayla_api.AylaApi", MockAyla) async def setup_integration(hass): """Build the mock integration.""" entry = MockConfigEntry( @@ -225,7 +225,7 @@ async def test_locate(hass): (RuntimeError, False), ], ) -@patch("sharkiqpy.ayla_api.AylaApi", MockAyla) +@patch("sharkiq.ayla_api.AylaApi", MockAyla) async def test_coordinator_updates( hass: HomeAssistant, side_effect: Exception | None, success: bool ) -> None: