-
Notifications
You must be signed in to change notification settings - Fork 54
Update __main__.py #523
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
Update __main__.py #523
Conversation
new pathway for structgen
|
|
||
|
|
||
| # Main function | ||
| # @param args Argument namespace | ||
| def main(args=None): | ||
| # issue a call to test TF, this is needed to keep |
Check notice
Code scanning / CodeQL
Commented-out code Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 8 hours ago
In general, to fix commented-out code, either (a) fully reinstate it as active code if it is actually needed, or (b) remove it entirely if it is obsolete or intentionally disabled. If the intent is to document example usage, it should be rephrased as a proper comment (possibly with quoting or formatting) rather than raw commented code.
Here, the commented elif branches for 'chainb' and 'autocorr' are clearly non-functional and appear to be obsolete subcommand handlers. Since we should not change existing functionality, the safest choice is to delete these commented-out lines altogether. This maintains current behavior (they were not executed anyway) while resolving the CodeQL warning and improving readability.
Concretely, in molSimplify/__main__.py within the main function’s help-handling block (lines ~505–510), remove the six lines:
# elif 'chainb' in args:
# parser = argparse.ArgumentParser(description=DescString_chainb)
# parseinputs_chainb(parser)
# elif 'autocorr' in args:
# parser = argparse.ArgumentParser(description=DescString_autocorr)
# parseinputs_autocorr(parser)No new imports, functions, or definitions are required.
| @@ -502,12 +502,6 @@ | ||
| if 'slabgen' in args: | ||
| parser = argparse.ArgumentParser(description=DescString_slabgen) | ||
| parseinputs_slabgen(parser) | ||
| # elif 'chainb' in args: | ||
| # parser = argparse.ArgumentParser(description=DescString_chainb) | ||
| # parseinputs_chainb(parser) | ||
| # elif 'autocorr' in args: | ||
| # parser = argparse.ArgumentParser(description=DescString_autocorr) | ||
| # parseinputs_autocorr(parser) | ||
| elif 'db' in args: | ||
| parser = argparse.ArgumentParser(description=DescString_db) | ||
| parseinputs_db(parser) |
added dependencies
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #523 +/- ##
==========================================
- Coverage 40.64% 40.61% -0.03%
==========================================
Files 93 93
Lines 30015 30024 +9
==========================================
- Hits 12199 12194 -5
- Misses 17816 17830 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
new pathway for structgen