This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Laszlo.Attila.Toth
Recipients Laszlo.Attila.Toth
Date 2021-12-12.14:53:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639320798.63.0.0421812802369.issue46057@roundup.psfhosted.org>
In-reply-to
Content
I tried to use the following code where the --db-password is not shown in the --help output (Originally I wanted to use mutually exclusive groups but that feature also works strangely, so I changed them to regular groups).

def register_db_args(parser: argparse.ArgumentParser):
    grp = parser.add_argument_group('Database settings')
    grp.add_argument('--db-config', dest='db_config_file',
                     help='Config file containg all details including password')

    grp.add_argument('--db-host')
    grp.add_argument('--db-port')
    grp.add_argument('--db-user')

    xgrp = grp.add_argument_group()
    xgrp.add_argument('--db-password')
    xgrp.add_argument('--db-password-env')
    xgrp.add_argument('--db-password-file')
History
Date User Action Args
2021-12-12 14:53:18Laszlo.Attila.Tothsetrecipients: + Laszlo.Attila.Toth
2021-12-12 14:53:18Laszlo.Attila.Tothsetmessageid: <1639320798.63.0.0421812802369.issue46057@roundup.psfhosted.org>
2021-12-12 14:53:18Laszlo.Attila.Tothlinkissue46057 messages
2021-12-12 14:53:18Laszlo.Attila.Tothcreate