MCPcopy
hub / github.com/docopt/docopt / Optional

Class Optional

docopt.py:239–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237
238
239class Optional(ParentPattern):
240
241 def match(self, left, collected=None):
242 collected = [] if collected is None else collected
243 for p in self.children:
244 m, left, collected = p.match(left, collected)
245 return True, left, collected
246
247
248class AnyOptions(Optional):

Callers 7

test_pattern_flatFunction · 0.90
test_parse_patternFunction · 0.90
test_optional_matchFunction · 0.90
test_one_or_more_matchFunction · 0.90
test_pattern_eitherFunction · 0.90

Calls

no outgoing calls

Tested by 7

test_pattern_flatFunction · 0.72
test_parse_patternFunction · 0.72
test_optional_matchFunction · 0.72
test_one_or_more_matchFunction · 0.72
test_pattern_eitherFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…