html/helpers.py
def tag_data(tag: str, data: str, tag_cls: str = None, sep: str = '') -> str:
    """

    data: string to wrap
    tag:  tag to wrap string
    sep:  separator string (ie newline) between tags and data
    Returns data wrapped in given tag
    """
    if tag_cls is None:
        cls_str = ""
    else:
        cls_str = " class=\"{}\"".format(tag_cls)
    if data is not None:
        return "<{0}{1}>{3}{2}{3}</{0}>".format(tag, cls_str, data, sep)
    else:
        return ""


    data: string to wrap
    tag:  tag to wrap string
    sep:  separator string (ie newline) between tags and data
    Returns data wrapped in given tag
    
string to wrap
tag:  tag to wrap string
sep:  separator string  between tags and data
Returns data wrapped in given tag
string to wrap tag : tag to wrap string sep : separator string between tags and data Returns data wrapped in given tag
def tag_data(tag: str, data: str, tag_cls: str = None, sep: str = '') -> str:
    if tag_cls is None:
        cls_str = ""
    else:
        cls_str = " class=\"{}\"".format(tag_cls)
    if data is not None:
        return "<{0}{1}>{3}{2}{3}</{0}>".format(tag, cls_str, data, sep)
    else:
        return ""
def tag_data ( tag : str , data : str , tag_cls : str = None , sep : str = '' ) -> str : if tag_cls is None : cls_str = "" else : cls_str = " class=\"{}\"" . format ( tag_cls ) if data is not None : return "<{0}{1}>{3}{2}{3}</{0}>" . format ( tag , cls_str , data , sep ) else : return ""
data: string to wrap
tag:  tag to wrap string
sep:  separator string (ie newline) between tags and data
Returns data wrapped in given tag
data : string to wrap tag : tag to wrap string sep : separator string ( ie newline ) between tags and data Returns data wrapped in given tag
"""

    data: string to wrap
    tag:  tag to wrap string
    sep:  separator string (ie newline) between tags and data
    Returns data wrapped in given tag
    """
tag
str
data
str
tag_cls
str
sep
str