summaryrefslogtreecommitdiffstats
path: root/Python/errors.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-06-07 21:11:59 (GMT)
committerGitHub <noreply@github.com>2019-06-07 21:11:59 (GMT)
commit606ac581e2451c420117c55632f0fe13d4cec2cd (patch)
treecb208cda0774022e3c142b55bb40b37b794df111 /Python/errors.c
parent6c9effabe0054c80a38b6d02cc52ec7b581e5f91 (diff)
downloadcpython-606ac581e2451c420117c55632f0fe13d4cec2cd.zip
cpython-606ac581e2451c420117c55632f0fe13d4cec2cd.tar.gz
cpython-606ac581e2451c420117c55632f0fe13d4cec2cd.tar.bz2
bpo-37150: Throw ValueError if FileType class object was passed in add_argument (GH-13805)
There is a possibility that someone (like me) accidentally will omit parentheses with `FileType` arguments after `FileType`, and parser will contain wrong file until someone will try to use it. Example: ```python parser = argparse.ArgumentParser() parser.add_argument('-x', type=argparse.FileType) ``` https://bugs.python.org/issue37150 (cherry picked from commit 03d5831a2d62c68654ec223168e574cd546efbf6) Co-authored-by: zygocephalus <grrrr@protonmail.com>
Diffstat (limited to 'Python/errors.c')
0 files changed, 0 insertions, 0 deletions