MCPcopy Index your code
hub / github.com/idank/explainshell / MatchGroup

Class MatchGroup

explainshell/matcher.py:13–31  ·  view source on GitHub ↗

a class to group matchresults together we group all shell results in one group and create a new group for every command

Source from the content-addressed store, hash-verified

11
12@dataclass
13class MatchGroup:
14 """a class to group matchresults together
15
16 we group all shell results in one group and create a new group for every
17 command"""
18
19 name: str
20 results: list = field(default_factory=list)
21 manpage: object = None
22 suggestions: list | None = None
23 error: Exception | None = None
24 # Tracks how many ordered positional arguments have been consumed for
25 # this command group. Each unmatched word advances the index so the
26 # next positional definition is used; once exhausted, the last
27 # positional is reused (variadic).
28 positional_index: int = field(default=0, repr=False)
29
30 def __repr__(self):
31 return "<matchgroup %r with %d results>" % (self.name, len(self.results))
32
33
34@dataclass(frozen=True, slots=True)

Callers 2

__init__Method · 0.85
startcommandMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected