Determines if the argument is a flag argument. If it starts with a hyphen and isn't a negative number, it's a flag. Args: argument: A command line argument that may or may not be a flag. Returns: A boolean indicating whether the argument is a flag.
(argument)
| 934 | |
| 935 | |
| 936 | def _IsFlag(argument): |
| 937 | """Determines if the argument is a flag argument. |
| 938 | |
| 939 | If it starts with a hyphen and isn't a negative number, it's a flag. |
| 940 | |
| 941 | Args: |
| 942 | argument: A command line argument that may or may not be a flag. |
| 943 | Returns: |
| 944 | A boolean indicating whether the argument is a flag. |
| 945 | """ |
| 946 | return _IsSingleCharFlag(argument) or _IsMultiCharFlag(argument) |
| 947 | |
| 948 | |
| 949 | def _IsSingleCharFlag(argument): |
no test coverage detected