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

Added support for multiple fixes per block in fix-file-resouce-leak #245

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

andrecsilva
Copy link
Contributor

Overview

fix-file-resource-leak will now fix multiple leaks in a single block at once

@andrecsilva andrecsilva marked this pull request as ready for review February 7, 2024 13:47
)
# is closed?
name_condition = map(
# pylint: disable-next=cell-var-from-loop
Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm either this pylint warning is worth listening to or it's a pylint bug? Either way, maybe a list-comp is easier to read here?

Copy link
Contributor Author

@andrecsilva andrecsilva Feb 8, 2024

Choose a reason for hiding this comment

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

I wanted to avoid building the list since the result would just be fed into all. I don't exactly remember the issue with the warning was. It may be invalid by now. I'll try to remove and see if it still complains.

Copy link
Contributor

@clavedeluna clavedeluna left a comment

Choose a reason for hiding this comment

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

Personal preference nit pick would be to use less one-letter variable names as it's harder to grep for them .

file_context: FileContext,
*codemod_args,
*codemod_args, # pylint: disable=unused-argument
Copy link
Member

Choose a reason for hiding this comment

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

Small thing but I think the idiomatic way to suppress this is with

del *codemod_args

Although possibly this argument is no longer needed?

Copy link

sonarcloud bot commented Feb 13, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@andrecsilva andrecsilva added this pull request to the merge queue Feb 13, 2024
Merged via the queue into main with commit a9c2c67 Feb 13, 2024
12 checks passed
@andrecsilva andrecsilva deleted the multi-fresource-leak branch February 13, 2024 12:07
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