Skip to content
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

Merged
merged 5 commits into from
Jul 18, 2024

Conversation

Miauwkeru
Copy link
Contributor

No description provided.

@Miauwkeru Miauwkeru requested a review from Poeloe July 5, 2024 10:56
Copy link

codecov bot commented Jul 5, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 43.39%. Comparing base (783b1ec) to head (1bd2f3e).

Files Patch % Lines
acquire/acquire.py 66.66% 1 Missing ⚠️
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           
Flag Coverage Δ
unittests 43.39% <75.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Miauwkeru Miauwkeru force-pushed the DIS-3228_change-flags-to-boolean-optional-action branch from 5a92941 to f77392f Compare July 8, 2024 07:55
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)
Copy link
Member

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?

Copy link
Contributor Author

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"
Copy link
Member

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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question.

@Miauwkeru Miauwkeru force-pushed the DIS-3228_change-flags-to-boolean-optional-action branch from 997a9d7 to 96d4f62 Compare July 18, 2024 09:01
@Miauwkeru Miauwkeru requested a review from Schamper July 18, 2024 11:07
acquire/acquire.py Outdated Show resolved Hide resolved
acquire/acquire.py Outdated Show resolved Hide resolved
acquire/acquire.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Poeloe Poeloe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@Poeloe Poeloe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix linting :)

@Miauwkeru Miauwkeru force-pushed the DIS-3228_change-flags-to-boolean-optional-action branch from 5766d2f to 1bd2f3e Compare July 18, 2024 12:27
Copy link
Contributor

@Poeloe Poeloe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now really: LGTM!

acquire/acquire.py Show resolved Hide resolved
@Miauwkeru Miauwkeru merged commit 3b6f067 into main Jul 18, 2024
17 of 18 checks passed
@Miauwkeru Miauwkeru deleted the DIS-3228_change-flags-to-boolean-optional-action branch July 18, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants