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 #1560

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

Pylint alerts corrections as part of an intervention experiment #1560

evidencebp opened this issue Nov 21, 2024 · 3 comments
Assignees
Labels
chore code health readability, maintainability, best practices, etc

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 54 interventions in 43 files
The interventions will be of the following types:
broad-exception-caught: 6
comparison-of-constants: 1
line-too-long: 33
superfluous-parens: 5
too-many-branches: 5
too-many-return-statements: 2
too-many-statements: 1
wildcard-import: 1

May I do the interventions?

@melange396
Copy link
Collaborator

Thank you for the generous offer! The number of proposed changes is fairly large and many of the source files affected are no longer being used in our live services, so this seems like a lot of work to do for small potential benefit. I am also not sure that we have enough cycles at the moment to properly review the result. If this is actually a fully automated process that will generate a PR, you can feel free to try it, but i cannot guarantee it will get attention from us in the near future.

@melange396 melange396 added chore code health readability, maintainability, best practices, etc labels Dec 5, 2024
@melange396 melange396 self-assigned this Dec 5, 2024
@evidencebp
Copy link
Author

Thank you for your feedback, @melange396 !
Can you point me to directories that are no longer used? Is there a different way to identify such files?
This way I'll be able to exclude.

Thank you for the no guarntee heads up too.
If the effort will be low enough, I'll take the risk.

@evidencebp
Copy link
Author

@melange396 , I created a PR with the fixes.

There were too alert on broad-exception-caught where I could not understand what are the expected exception.
Can you consult me?

In src\server\utils\dates.py (line 152) Exception is caught.
The try section calls get_structured_logger which I did not find. What are the possible exceptions?

src\acquisition\paho\paho_download.py (line 184) also Exception is caught.
There is more code in the try section.
What are the possible exceptions here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore code health readability, maintainability, best practices, etc
Projects
None yet
Development

No branches or pull requests

2 participants