-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add optional boolean value to all store_true instances #179
Add optional boolean value to all store_true instances #179
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #179 +/- ##
=======================================
Coverage 43.39% 43.39%
=======================================
Files 26 26
Lines 3374 3374
=======================================
Hits 1464 1464
Misses 1910 1910
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
5a92941
to
f77392f
Compare
acquire/utils.py
Outdated
@@ -99,7 +99,7 @@ def create_argument_parser(profiles: dict, volatile: dict, modules: dict) -> arg | |||
) | |||
parser.add_argument("--public-key", type=Path, help=argparse.SUPPRESS) | |||
parser.add_argument("-l", "--log", type=Path, help="log directory location") | |||
parser.add_argument("--no-log", action="store_true", help=argparse.SUPPRESS) | |||
parser.add_argument("--no-log", action=argparse.BooleanOptionalAction, help=argparse.SUPPRESS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will this work? —no-no-log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that it would, I can look into how to invert the checks, or just skip the flags that already have --no
or --disable
in it.
acquire/utils.py
Outdated
@@ -114,24 +114,28 @@ def create_argument_parser(profiles: dict, volatile: dict, modules: dict) -> arg | |||
parser.add_argument("-d", "--directory", action="append", help="acquire directory recursively") | |||
parser.add_argument("-g", "--glob", action="append", help="acquire files matching glob pattern") | |||
|
|||
parser.add_argument("--disable-report", action="store_true", help="disable acquisition report file") | |||
parser.add_argument( | |||
"--disable-report", action=argparse.BooleanOptionalAction, help="disable acquisition report file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, no-disable-report?
acquire/utils.py
Outdated
help="upload result files after collection", | ||
) | ||
parser.add_argument( | ||
"--upload", | ||
nargs="+", | ||
help="upload specified files (all other acquire actions are ignored)", | ||
) | ||
parser.add_argument("--no-proxy", action="store_true", help="don't autodetect proxies") | ||
parser.add_argument("--no-proxy", action=argparse.BooleanOptionalAction, help="don't autodetect proxies") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question.
997a9d7
to
96d4f62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix linting :)
5766d2f
to
1bd2f3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now really: LGTM!
No description provided.