Gets a list of single-character flags that uniquely identify a flag. Args: flags: list of strings representing flags Returns: List of single character short flags, where the character occurred at the start of a flag once.
(flags)
| 174 | |
| 175 | |
| 176 | def _GetShortFlags(flags): |
| 177 | """Gets a list of single-character flags that uniquely identify a flag. |
| 178 | |
| 179 | Args: |
| 180 | flags: list of strings representing flags |
| 181 | |
| 182 | Returns: |
| 183 | List of single character short flags, |
| 184 | where the character occurred at the start of a flag once. |
| 185 | """ |
| 186 | short_flags = [f[0] for f in flags] |
| 187 | short_flag_counts = collections.Counter(short_flags) |
| 188 | return [v for v in short_flags if short_flag_counts[v] == 1] |
| 189 | |
| 190 | |
| 191 | def _ArgsAndFlagsSections(info, spec, metadata): |
no outgoing calls
no test coverage detected