We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e61504 commit b9600b0Copy full SHA for b9600b0
Lib/argparse.py
@@ -1479,10 +1479,8 @@ def _get_optional_kwargs(self, *args, **kwargs):
1479
1480
# strings starting with two prefix characters are long options
1481
option_strings.append(option_string)
1482
- if option_string[0] in self.prefix_chars:
1483
- if len(option_string) > 1:
1484
- if option_string[1] in self.prefix_chars:
1485
- long_option_strings.append(option_string)
+ if len(option_string) > 1 and option_string[1] in self.prefix_chars:
+ long_option_strings.append(option_string)
1486
1487
# infer destination, '--foo-bar' -> 'foo_bar' and '-x' -> 'x'
1488
dest = kwargs.pop('dest', None)
0 commit comments