From 564a549aca41e88e3a25530f1b15dd3a05d5062b Mon Sep 17 00:00:00 2001 From: Yassir Karroum Date: Fri, 4 Feb 2022 08:07:13 +0100 Subject: [PATCH 1/2] bpo-20039: Add doc to argparse.ArgumentTypeError --- Doc/library/argparse.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index e050d6298b6ff6..e95d8d3a61ecd2 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -2130,6 +2130,13 @@ containing the populated namespace and the list of remaining argument strings. :meth:`~ArgumentParser.parse_intermixed_args` raises an error if there are any remaining unparsed argument strings. +Exceptions +^^^^^^^^^^ + +.. exception:: ArgumentTypeError + + An error from trying to convert a command line string to a type + .. versionadded:: 3.7 .. _upgrading-optparse-code: From 5f14ece61938de46432738be1c6281f3a47a439f Mon Sep 17 00:00:00 2001 From: Yassir Karroum Date: Thu, 26 Oct 2023 20:26:01 +0200 Subject: [PATCH 2/2] bpo-20039: Fixed mistake where 'Added in version 3.7' was in the bad place --- Doc/library/argparse.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index e95d8d3a61ecd2..29973a43b442ab 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -2130,6 +2130,8 @@ containing the populated namespace and the list of remaining argument strings. :meth:`~ArgumentParser.parse_intermixed_args` raises an error if there are any remaining unparsed argument strings. +.. versionadded:: 3.7 + Exceptions ^^^^^^^^^^ @@ -2137,8 +2139,6 @@ Exceptions An error from trying to convert a command line string to a type -.. versionadded:: 3.7 - .. _upgrading-optparse-code: Upgrading optparse code