(data: dict)
Parse the data in the proper displaying format

    Arguments:
        data {dict} -- content that is to be displayed
Parse the data in the proper displaying format
Parse the data in the proper displaying format
def parse(data: dict):
    """Parse the data in the proper displaying format

    Arguments:
        data {dict} -- content that is to be displayed
    """

    def form(val):
        """To format the "code" that is being printed

        The code section had `\n` which kinda breaks
        the flow when printed on terminal so we replace `\n` with `\n\t`

        Arguments:
            val {[str]} -- commands with \n

        Returns:
            [str] -- commands with \n\t
        """
        return val.replace("\n", "\n\t")

    sections = data["functions"]

    for sec in sections:
        category = sections[sec]

        for cat in category:
            if "description" in cat:
                print("# " + colors(cat['description'], 93))
            print("Code:\t" + colors(form(cat['code']), 92))
            print("Type:\t" + colors(sec, 91))
            print("\n")
def parse ( data : dict ) : def form ( val ) : """To format the "code" that is being printed

        The code section had `\n` which kinda breaks
        the flow when printed on terminal so we replace `\n` with `\n\t`

        Arguments:
            val {[str]} -- commands with \n

        Returns:
            [str] -- commands with \n\t
        """ return val . replace ( "\n" , "\n\t" ) sections = data [ "functions" ] for sec in sections : category = sections [ sec ] for cat in category : if "description" in cat : print ( "# " + colors ( cat [ 'description' ] , 93 ) ) print ( "Code:\t" + colors ( form ( cat [ 'code' ] ) , 92 ) ) print ( "Type:\t" + colors ( sec , 91 ) ) print ( "\n" )