File tree Expand file tree Collapse file tree 4 files changed +10
-9
lines changed
custom_components/plugwise_usb Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 11[project ]
22name = " plugwise_usb-beta"
3- version = " 0.40.7 "
3+ version = " 0.40.8b1 "
44description = " Plugwise USB custom_component (BETA)"
55readme = " README.md"
66requires-python = " >=3.12"
@@ -218,6 +218,7 @@ max-complexity = 25
218218addopts = [
219219 " --cov=custom_components"
220220]
221+ asyncio_default_fixture_loop_scope = " session"
221222
222223[tool .pytest .ini_options ]
223224testpaths = " tests"
Original file line number Diff line number Diff line change 2929if [ -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 ..."
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments