X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=src%2Fpyutils%2Fargparse_utils.py;h=a0b4cc24d587690d9a59564e8000a656c2c7c645;hb=278d163705facc2276cd464414fb490ef6af50ab;hp=f142d7e4a4adeb42c7e6f2d82031fc99ed732232;hpb=682fab38c65f3df70597b044c9b76c5dd81bf9d4;p=pyutils.git diff --git a/src/pyutils/argparse_utils.py b/src/pyutils/argparse_utils.py index f142d7e..a0b4cc2 100644 --- a/src/pyutils/argparse_utils.py +++ b/src/pyutils/argparse_utils.py @@ -3,10 +3,15 @@ # © Copyright 2021-2022, Scott Gasch """These are helpers for commandline argument parsing meant to work -with Python's :mod:`argparse` module from the standard library. It -contains validators for new argument types (such as free-form dates, -durations, IP addresses, etc...) and an action that creates a pair of -flags: one to disable a feature and another to enable it. +with Python's :mod:`argparse` module from the standard library (See: +https://docs.python.org/3/library/argparse.html). It contains +validators for new argument types (such as free-form dates, durations, +IP addresses, etc...) and an action that creates a pair of flags: one +to disable a feature and another to enable it. + +See also :py:class:`pyutils.config.OptionalRawFormatter` which is +automatically enabled if you use :py:mod:`config` module. + """ import argparse @@ -367,7 +372,7 @@ def valid_datetime(txt: str) -> datetime.datetime: .. note:: Because this code uses an English date-expression parsing grammar internally, much more complex datetimes can be expressed in free form. - See: `tests/datetimez/dateparse_utils_test.py` for examples. These + See :mod:`pyutils.datetimez.dateparse_utils` for details. These are not included in here because they are hard to write valid doctests for!