-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorect "usage" argument order for github backend #799
Comments
You are right. This is a bug. Thanks for reporting it. It's the same behaviour with the other backeds too. |
Hi
I fixed this by setting the prog correctly.
The order of arguments in the help/usage seems to be automatically generated by the $ perceval github -h
[2024-08-12 17:58:47,081] - Sir Perceval is on his quest.
usage: perceval github [-h] [--category CATEGORY] [--tag TAG] [--filter-classified] [--from-date FROM_DATE] [--to-date TO_DATE] [--archive-path ARCHIVE_PATH] [--no-archive] [--fetch-archive]
[--archived-since ARCHIVED_SINCE] [--no-ssl-verify] [-o OUTFILE] [--json-line] [--enterprise-url BASE_URL] [--sleep-for-rate] [--min-rate-to-sleep MIN_RATE_TO_SLEEP]
[-t API_TOKEN [API_TOKEN ...]] [--github-app-id GITHUB_APP_ID] [--github-app-pk-filepath GITHUB_APP_PK_FILEPATH] [--max-items MAX_ITEMS] [--max-retries MAX_RETRIES]
[--sleep-time SLEEP_TIME]
owner repository
positional arguments:
owner GitHub owner
repository GitHub repository
optional arguments:
-h, --help show this help message and exit
. . .
. . . |
Initially, it seemed that because Here is a small POC import argparse
parser = argparse.ArgumentParser()
parser.add_argument('x', type=int, help='first value')
parser.add_argument('-f', type=int, help='second value')
args = parser.parse_args() $ python script.py -h
usage: script.py [-h] [-f F] x
positional arguments:
x first value
optional arguments:
-h, --help show this help message and exit
-f F second value |
First time user here. I was finally able to successfully export GitHub data, thanks!
perceval github --help
givesbut it's actually
Maybe this is some weird standard way to output the usage, but I found it confusing and I think this would be better if it were in the correct order and included the backend in the usage.
The text was updated successfully, but these errors were encountered: