-
Notifications
You must be signed in to change notification settings - Fork 50
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
Pylint alerts corrections as part of intervention experiment #81
Comments
@evidencebp yes please feel free |
Great, Thanks! |
I created the PR. However, I had a problem with the relative imports so I could not run neither the code nor the tests. Can you please:
|
When running c:/src/vault/src/main.py PS C:\src\vault> & C:/Users/USER/anaconda3/envs/vault/python.exe c:/src/vault/src/main.py |
* src\views\setup.py line-too-long Line was one letter too long * src\tools\troubleshoot_db.py simplifiable-if-expression if result_proxy.fetchall() == [(123,)] can result in only True or False, the external condition is not needed. However, if result_proxy.fetchall() might return Noe, the external condition can translate it to False. The external condition hurt readability since it takes a bit to verify what it does. bool is a simpler implementation See https://stackoverflow.com/questions/76094401/the-if-expression-can-be-replaced-with-test-simplifiable-if-expression * src\views\menu.py broad-exception-caught Code deliberately catches Exception, after catching KeyboardInterrupt. However, looking at the protected code it seems that no other exception can be raised. Hence, instead of narrowing the exception, I removed it. * src\lib\Config.py line-too-long Made the long, yet readable, comment shorter * src\modules\autocomplete.py broad-exception-caught Code deliberately catches Exception, after catching KeyboardInterrupt. However, looking at the protected code it seems that no other exception can be raised. Hence, instead of narrowing the exception, I removed it. * src\modules\misc.py broad-exception-caught Exception is too wide. os.path.exists does not throw exceptions. os.makedirs might throw OSError (e.g., in a bad path). See https://stackoverflow.com/questions/2383816/how-can-i-make-an-error-verifiy-with-os-makedirs-in-python As extra safety, though the code checks just before for the directory, catch it too in case a different process will be able to create it before. * src\views\categories.py superfluous-parens Replaced (True) to True * src\views\import_export.py line-too-long Made a readable comment line shorter * src\views\migration.py line-too-long Made the line shorter. Since the string is also formatted, parenthesis are added for operations precedence.
The PR looks good. It's hard to run this program from Windows, I wouldn't be able to guide you, I use a unix-bases system |
Thank you very much! |
I'd like to conduct a software engineering experiment regarding the benefit of Pylint alerts removal.
The experiment is described here.
In the experiments, Pylint is used with some specific alerts, files are selected for intervention and control.
After the interventions are done, one can wait and examine the results.
I'm asking for your approval for conducting the interventions in your repositories.The interventions are expected to benefit the project and will be submitted in PR for approval.
These are the planed interventions.
@gabfl @huangyunict @bubak4, may I fix the alerts?
The text was updated successfully, but these errors were encountered: