Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.6k stars 2.81k forks source link

Wrong type hint for function make_link in azure.ai.ml._utils._html_utils.py #30092

Closed martinResearch closed 2 weeks ago

martinResearch commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

when I run mypy on my code I get a error with the function make_link. The type hint is wrong for that function:

def make_link(link_string, link_text=None):
    # type: (str) -> str
    if not link_text:  # Actually want truthy string
        link_text = "Link"
    return LINK_FMT.format(escape(link_string), link_text)

it should be

def make_link(link_string, link_text=None):
    # type: (str, Optional[str]) -> str
    if not link_text:  # Actually want truthy string
        link_text = "Link"
    return LINK_FMT.format(escape(link_string), link_text)
kashifkhan commented 1 year ago

Thanks for the feedback @martinResearch . We will investigate and get back to you asap.

cc @azureml-github

github-actions[bot] commented 5 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.

achauhan-scc commented 2 weeks ago

we fixed multiple mypy issue, closing as obsolete