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

Pylint alerts corrections as part of an intervention experiment #1017

Open
evidencebp opened this issue Nov 21, 2024 · 6 comments
Open

Pylint alerts corrections as part of an intervention experiment #1017

evidencebp opened this issue Nov 21, 2024 · 6 comments

Comments

@evidencebp
Copy link

Pylint alerts are correlated with tendency to bugs and harder maintenance.
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.

Your repository is expected to benefit from the interventions.
I'm asking for your approval for conducting an intervention in your repository.

See examples of interventions in stanford-oval/storm, gabfl/vault, and coreruleset/coreruleset.

You can see the planed interventions
The plan is to do 17 interventions in 13 files
The interventions will be of the following types:
superfluous-parens: 2
too-many-branches: 7
try-except-raise: 1
unnecessary-pass: 1
too-many-statements: 2
simplifiable-if-statement: 1
broad-exception-caught: 2
too-many-lines: 1

May I do the interventions?

@aliciaaevans
Copy link
Contributor

I'll bring this to the attention of the @bioconda/core team and get back to you.

@evidencebp
Copy link
Author

Thanks!

@bgruening
Copy link
Member

+1 from me.

@evidencebp
Copy link
Author

Thanks, @bgruening !

@evidencebp
Copy link
Author

Please see the PR

@evidencebp
Copy link
Author

There are some alerts that I'll be happy to get your advices about.

broad-exception-caught
bioconda_utils\lint_init_.py
The function lint_one catches Exception in line 614. The tried code is res = self.check_instances[check].run(recipe, fix) I did not figure out which exceptions are expected. The handing logs the exception. The method lint calls in line 557 msgs = self.lint_one(recipe_name, fix=fix) leading to the same confusion.

too-many-lines
bioconda_utils\githubhandler.py
The file has over 1,300 lines of code, making it hard to read and understand. The class contains some different classes so it is natural to split the classes into dedicated files. Are you ok with splitting the file? Are dedicated files per class the proper solution?

try-except-raise
bioconda_utils\aiopipe.py
Function process catches asyncio.CancelledError and immediately raises it.In principle, it can just be removed but doing that here will make it handled by the Exception section below. It is not logged like other exceptions in the function.Is it intended?

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

No branches or pull requests

3 participants