Skip to content

Commit 294b391

Browse files
authored
fix mypy warnings (Azure#35693)
1 parent ec92c63 commit 294b391

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_html_utils.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from datetime import datetime, timedelta
88
from html import escape
99

10-
1110
SUPPORTED_VALUE_TYPE_TUPLE = (int, float, str, datetime, timedelta)
1211
TABLE_FMT = '<table style="width:100%">{0}</table>'
1312
ROW_FMT = "<tr>{0}</tr>"
@@ -96,20 +95,17 @@ def to_html(object_to_convert):
9695
return converted_value
9796

9897

99-
def is_string_link(string):
100-
# type: (str) -> bool
98+
def is_string_link(string: str) -> bool:
10199
return isinstance(string, str) and string.strip().lower().startswith("http")
102100

103101

104-
def make_link(link_string, link_text=None):
105-
# type: (str) -> str
102+
def make_link(link_string: str, link_text: str = "") -> str:
106103
if not link_text: # Actually want truthy string
107104
link_text = "Link"
108105
return LINK_FMT.format(escape(link_string), link_text)
109106

110107

111-
def convert_value(value):
112-
# type: (...) -> str
108+
def convert_value(value: str) -> str:
113109
if value is None:
114110
return ""
115111
if is_string_link(value):

0 commit comments

Comments
 (0)