Build a debug_info dict for an option-backed match.
(option)
| 50 | |
| 51 | |
| 52 | def _option_debug(option): |
| 53 | """Build a debug_info dict for an option-backed match.""" |
| 54 | return { |
| 55 | "kind": "option", |
| 56 | "short": option.short, |
| 57 | "long": option.long, |
| 58 | "has_argument": option.has_argument, |
| 59 | "positional": option.positional, |
| 60 | "prefix": option.prefix, |
| 61 | "nested_cmd": option.nested_cmd, |
| 62 | } |
| 63 | |
| 64 | |
| 65 | match_word_exp = collections.namedtuple("match_word_exp", "start end kind") |
no outgoing calls
no test coverage detected