Skip to content

Commit ab695f9

Browse files
authored
Upgrade url-normalize to 2.2.1 (#143751)
1 parent efcf8f9 commit ab695f9

File tree

7 files changed

+18
-15
lines changed

7 files changed

+18
-15
lines changed

homeassistant/components/huawei_lte/config_flow.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,12 @@ async def async_step_ssdp(
276276
if TYPE_CHECKING:
277277
assert discovery_info.ssdp_location
278278
url = url_normalize(
279-
discovery_info.upnp.get(
280-
ATTR_UPNP_PRESENTATION_URL,
281-
f"http://{urlparse(discovery_info.ssdp_location).hostname}/",
282-
)
279+
discovery_info.upnp.get(ATTR_UPNP_PRESENTATION_URL)
280+
or f"http://{urlparse(discovery_info.ssdp_location).hostname}/"
283281
)
282+
if TYPE_CHECKING:
283+
# url_normalize only returns None if passed None, and we don't do that
284+
assert url is not None
284285

285286
unique_id = discovery_info.upnp.get(
286287
ATTR_UPNP_SERIAL, discovery_info.upnp[ATTR_UPNP_UDN]

homeassistant/components/huawei_lte/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"requirements": [
1010
"huawei-lte-api==1.11.0",
1111
"stringcase==1.2.0",
12-
"url-normalize==2.2.0"
12+
"url-normalize==2.2.1"
1313
],
1414
"ssdp": [
1515
{

homeassistant/components/syncthru/config_flow.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Config flow for Samsung SyncThru."""
22

33
import re
4-
from typing import Any
4+
from typing import TYPE_CHECKING, Any
55
from urllib.parse import urlparse
66

77
from pysyncthru import ConnectionMode, SyncThru, SyncThruAPINotSupported
@@ -44,12 +44,14 @@ async def async_step_ssdp(
4444
await self.async_set_unique_id(discovery_info.upnp[ATTR_UPNP_UDN])
4545
self._abort_if_unique_id_configured()
4646

47-
self.url = url_normalize(
48-
discovery_info.upnp.get(
49-
ATTR_UPNP_PRESENTATION_URL,
50-
f"http://{urlparse(discovery_info.ssdp_location or '').hostname}/",
51-
)
47+
norm_url = url_normalize(
48+
discovery_info.upnp.get(ATTR_UPNP_PRESENTATION_URL)
49+
or f"http://{urlparse(discovery_info.ssdp_location or '').hostname}/"
5250
)
51+
if TYPE_CHECKING:
52+
# url_normalize only returns None if passed None, and we don't do that
53+
assert norm_url is not None
54+
self.url = norm_url
5355

5456
for existing_entry in (
5557
x for x in self._async_current_entries() if x.data[CONF_URL] == self.url

homeassistant/components/syncthru/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"documentation": "https://www.home-assistant.io/integrations/syncthru",
77
"iot_class": "local_polling",
88
"loggers": ["pysyncthru"],
9-
"requirements": ["PySyncThru==0.8.0", "url-normalize==2.2.0"],
9+
"requirements": ["PySyncThru==0.8.0", "url-normalize==2.2.1"],
1010
"ssdp": [
1111
{
1212
"deviceType": "urn:schemas-upnp-org:device:Printer:1",

homeassistant/components/zwave_me/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"config_flow": true,
77
"documentation": "https://www.home-assistant.io/integrations/zwave_me",
88
"iot_class": "local_push",
9-
"requirements": ["zwave-me-ws==0.4.3", "url-normalize==2.2.0"],
9+
"requirements": ["zwave-me-ws==0.4.3", "url-normalize==2.2.1"],
1010
"zeroconf": [
1111
{
1212
"type": "_hap._tcp.local.",

requirements_all.txt

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

requirements_test_all.txt

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)