Skip to content

Commit 28f17fd

Browse files
committed
look if version increase has effect
1 parent fdd8e17 commit 28f17fd

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

custom_components/plugwise_usb/config_flow.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ async def async_step_user(
8686
)
8787
errors, mac_stick = await validate_usb_connection(self.hass, device_path)
8888
if not errors:
89-
await self.async_set_unique_id(unique_id=mac_stick, raise_on_progress=False)
89+
await self.async_set_unique_id(
90+
unique_id=mac_stick, raise_on_progress=False
91+
)
9092
self._abort_if_unique_id_configured()
9193
return self.async_create_entry(
9294
title="Stick", data={CONF_USB_PATH: device_path}

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "plugwise_usb-beta"
3-
version = "0.40.7"
3+
version = "0.40.8b1"
44
description = "Plugwise USB custom_component (BETA)"
55
readme = "README.md"
66
requires-python = ">=3.12"
@@ -218,6 +218,7 @@ max-complexity = 25
218218
addopts = [
219219
"--cov=custom_components"
220220
]
221+
asyncio_default_fixture_loop_scope = "session"
221222

222223
[tool.pytest.ini_options]
223224
testpaths = "tests"

scripts/tests_and_coverage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fi
2929
if [ -z "${GITHUB_ACTIONS}" ] || [ "$1" == "linting" ] ; then
3030
# Black first to ensure nothings roughing up ruff
3131
echo "... ruff checking ..."
32-
ruff check -fix
32+
ruff check --fix
3333

3434
# TODO: Skip ruff checks as there are too many for now (mainly missing docstrings)
3535
# echo "... ruff-ing ..."

tests/conftest.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ async def init_integration(
4949

5050
return mock_config_entry
5151

52+
5253
# @pytest.fixture
5354
# def mock_comport() -> Generator[MagicMock]:
5455
# """Return a mocked comport."""
@@ -68,8 +69,7 @@ def mock_usb_stick() -> Generator[MagicMock]:
6869
"""Return a mocked usb_mock."""
6970

7071
with patch(
71-
"custom_components.plugwise_usb.config_flow.Stick",
72-
autospec=True
72+
"custom_components.plugwise_usb.config_flow.Stick", autospec=True
7373
) as mock_usb:
7474
usb = mock_usb.return_value
7575

@@ -86,8 +86,7 @@ def mock_usb_stick_error() -> Generator[MagicMock]:
8686
"""Return a mocked usb_mock."""
8787

8888
with patch(
89-
"custom_components.plugwise_usb.config_flow.Stick",
90-
autospec=True
89+
"custom_components.plugwise_usb.config_flow.Stick", autospec=True
9190
) as mock_usb:
9291
usb = mock_usb.return_value
9392

@@ -104,8 +103,7 @@ def mock_usb_stick_init_error() -> Generator[MagicMock]:
104103
"""Return a mocked usb_mock."""
105104

106105
with patch(
107-
"custom_components.plugwise_usb.config_flow.Stick",
108-
autospec=True
106+
"custom_components.plugwise_usb.config_flow.Stick", autospec=True
109107
) as mock_usb:
110108
usb = mock_usb.return_value
111109

0 commit comments

Comments
 (0)