(parser)
| 42 | return getattr(parser, "option_groups", None) or getattr(parser, "_action_groups") |
| 43 | |
| 44 | def get_all_options(parser): |
| 45 | retVal = set() |
| 46 | |
| 47 | for option in get_actions(parser): |
| 48 | if hasattr(option, "option_strings"): |
| 49 | retVal.update(option.option_strings) |
| 50 | else: |
| 51 | retVal.update(option._long_opts) |
| 52 | retVal.update(option._short_opts) |
| 53 | |
| 54 | for group in get_groups(parser): |
| 55 | for option in get_actions(group): |
| 56 | if hasattr(option, "option_strings"): |
| 57 | retVal.update(option.option_strings) |
| 58 | else: |
| 59 | retVal.update(option._long_opts) |
| 60 | retVal.update(option._short_opts) |
| 61 | |
| 62 | return retVal |
| 63 | |
| 64 | from lib.core.common import getUnicode |
| 65 | from lib.core.common import setPaths |
nothing calls this directly
no test coverage detected
searching dependent graphs…