ordered mapping of positional name -> (prefix, merged help text) for positionals that declare a literal token prefix
(self)
| 133 | |
| 134 | @property |
| 135 | def prefixed_positionals(self): |
| 136 | """ordered mapping of positional name -> (prefix, merged help text) |
| 137 | for positionals that declare a literal token prefix""" |
| 138 | groups = collections.OrderedDict() |
| 139 | for opt in self.options: |
| 140 | if opt.positional and opt.prefix: |
| 141 | groups.setdefault(opt.positional, []).append(opt) |
| 142 | |
| 143 | merged = collections.OrderedDict() |
| 144 | for k, ln in groups.items(): |
| 145 | merged[k] = (ln[0].prefix, "\n\n".join([p.text for p in ln])) |
| 146 | |
| 147 | return merged |
| 148 | |
| 149 | def find_option(self, flag): |
| 150 | for o_tmp in self.options: |
nothing calls this directly
no outgoing calls
no test coverage detected