From 59b4e426018f3167fd7c47be0cd10ea28df48a16 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Tue, 24 Oct 2023 10:21:13 +0100 Subject: [PATCH] Fixes linter errors Signed-off-by: Elena Kolevska --- dapr/conf/helpers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dapr/conf/helpers.py b/dapr/conf/helpers.py index 19c992c6..0342b751 100644 --- a/dapr/conf/helpers.py +++ b/dapr/conf/helpers.py @@ -123,7 +123,9 @@ def _preprocess_uri(self, url: str) -> str: if len(url_list) == 3 and "://" not in url: # A URI like dns:mydomain:5000 or vsock:mycid:5000 was used url = url.replace(":", "://", 1) - elif len(url_list) >= 2 and "://" not in url and url_list[0] in URIParseConfig.ACCEPTED_SCHEMES: + elif len(url_list) >= 2 and "://" not in url and url_list[ + 0] in URIParseConfig.ACCEPTED_SCHEMES: + # A URI like dns:mydomain or dns:[2001:db8:1f70::999:de8:7648:6e8]:mydomain was used # Possibly a URI like dns:[2001:db8:1f70::999:de8:7648:6e8]:mydomain was used url = url.replace(":", "://", 1)