Skip to content

Commit 0d45340

Browse files
committed
fix linter warning
1 parent fb362be commit 0d45340

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Lib/argparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ def __init__(self,
956956
def __call__(self, parser, namespace, values, option_string=None):
957957
if '-' not in parser.prefix_chars:
958958
raise ValueError("BooleanOptionalAction requires '-' in parser's prefix_chars")
959-
959+
960960
if option_string in self.option_strings:
961961
setattr(namespace, self.dest, not option_string.startswith('--no-'))
962962

Lib/test/test_argparse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,10 +798,10 @@ def test_invalid_name(self):
798798
def test_prefix_chars_incompatibility(self):
799799
parser = argparse.ArgumentParser(prefix_chars='+')
800800
parser.add_argument('++foo', action=argparse.BooleanOptionalAction)
801-
801+
802802
with self.assertRaises(ValueError) as cm:
803803
parser.parse_args(['++foo'])
804-
804+
805805
self.assertIn(str(cm.exception),
806806
"BooleanOptionalAction requires '-' in parser's prefix_chars")
807807

0 commit comments

Comments
 (0)