MCPcopy
hub / github.com/caronc/apprise / parse_list

Method parse_list

apprise/url.py:739–762  ·  view source on GitHub ↗

A wrapper to utils.parse_list() with unquoting support. Parses a specified set of data and breaks it into a list. Args: content (str): The path to split up into a list. If a list is provided, then it's individual entries are processed. allo

(content, allow_whitespace=True, unquote=True)

Source from the content-addressed store, hash-verified

737
738 @staticmethod
739 def parse_list(content, allow_whitespace=True, unquote=True):
740 """A wrapper to utils.parse_list() with unquoting support.
741
742 Parses a specified set of data and breaks it into a list.
743
744 Args:
745 content (str): The path to split up into a list. If a list is
746 provided, then it's individual entries are processed.
747
748 allow_whitespace (:obj:`bool`, optional): whitespace is to be
749 treated as a delimiter
750
751 unquote (:obj:`bool`, optional): call unquote on each element
752 added to the returned list.
753
754 Returns:
755 list: A unique list containing all of the elements in the path
756 """
757
758 content = parse_list(content, allow_whitespace=allow_whitespace)
759 if unquote:
760 content = [URLBase.unquote(x) for x in filter(bool, content)]
761
762 return content
763
764 @staticmethod
765 def parse_phone_no(content, unquote=True, prefix=False):

Callers 15

test_parse_listFunction · 0.80
test_notify_baseFunction · 0.80
parse_urlMethod · 0.80
parse_urlMethod · 0.80
parse_urlMethod · 0.80
parse_urlMethod · 0.80
parse_urlMethod · 0.80
parse_urlMethod · 0.80
parse_urlMethod · 0.80
parse_urlMethod · 0.80
parse_urlMethod · 0.80
parse_urlMethod · 0.80

Calls 2

parse_listFunction · 0.85
unquoteMethod · 0.80

Tested by 2

test_parse_listFunction · 0.64
test_notify_baseFunction · 0.64