MCPcopy Create free account
hub / github.com/PlatformLab/NanoLog / Command

Class Command

preprocessor/docopt.py:165–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163
164
165class Command(Argument):
166
167 def __init__(self, name, value=False):
168 self.name, self.value = name, value
169
170 def single_match(self, left):
171 for n, pattern in enumerate(left):
172 if type(pattern) is Argument:
173 if pattern.value == self.name:
174 return n, Command(self.name, True)
175 else:
176 break
177 return None, None
178
179
180class Option(LeafPattern):

Callers 2

single_matchMethod · 0.85
parse_atomFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected