MCPcopy
hub / github.com/docopt/docopt / Command

Class Command

docopt.py:170–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168
169
170class Command(Argument):
171
172 def __init__(self, name, value=False):
173 self.name = name
174 self.value = value
175
176 def single_match(self, left):
177 for n, p in enumerate(left):
178 if type(p) is Argument:
179 if p.value == self.name:
180 return n, Command(self.name, True)
181 else:
182 break
183 return None, None
184
185
186class Option(ChildPattern):

Callers 4

test_parse_patternFunction · 0.90
test_command_matchFunction · 0.90
single_matchMethod · 0.85
parse_atomFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_parse_patternFunction · 0.72
test_command_matchFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…