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 khalidmammadov
Recipients khalidmammadov, rhettinger
Date 2021-09-16.20:22:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631823747.23.0.273060540217.issue45224@roundup.psfhosted.org>
In-reply-to
Content
This is another, larger example, where I actually stumbled on this when looking into Apache Airflow project. Below makes it confusing to see what is actually required and what not. Unless you look for square brackets. Would be it much nicer to list required ones explicitly rather than looking into options and figuring out which one is a must?

usage: airflow users create [-h] -e EMAIL -f FIRSTNAME -l LASTNAME [-p PASSWORD] -r ROLE [--use-random-password] -u USERNAME

Create a user

optional arguments:
  -h, --help            show this help message and exit
  -e EMAIL, --email EMAIL
                        Email of the user
  -f FIRSTNAME, --firstname FIRSTNAME
                        First name of the user
  -l LASTNAME, --lastname LASTNAME
                        Last name of the user
  -p PASSWORD, --password PASSWORD
                        Password of the user, required to create a user without --use-random-password
  -r ROLE, --role ROLE  Role of the user. Existing roles include Admin, User, Op, Viewer, and Public
  --use-random-password
                        Do not prompt for password. Use random string instead. Required to create a user without --password 
  -u USERNAME, --username USERNAME
                        Username of the user

examples:
To create an user with "Admin" role and username equals to "admin", run:

    $ airflow users create \
          --username admin \
          --firstname FIRST_NAME \
          --lastname LAST_NAME \
          --role Admin \
          --email admin@example.org

airflow users create command error: the following arguments are required: -e/--email, -f/--firstname, -l/--lastname, -r/--role, -u/--username, see help above.
History
Date User Action Args
2021-09-16 20:22:27khalidmammadovsetrecipients: + khalidmammadov, rhettinger
2021-09-16 20:22:27khalidmammadovsetmessageid: <1631823747.23.0.273060540217.issue45224@roundup.psfhosted.org>
2021-09-16 20:22:27khalidmammadovlinkissue45224 messages
2021-09-16 20:22:27khalidmammadovcreate