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

add threading codemod docs #88

Merged
merged 1 commit into from
Oct 18, 2023
Merged

add threading codemod docs #88

merged 1 commit into from
Oct 18, 2023

Conversation

clavedeluna
Copy link
Contributor

No description provided.


### Why is this codemod marked as Merge After Cursory Review?

This codemod creates a new variable named `lock` which could clash with another variable of the same name in the module.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

is this too honest?

Copy link
Member

Choose a reason for hiding this comment

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

Haha I think it's honest enough but honestly I'm thinking maybe we should just address this in the codemod before we go public with this one. I've got a ticket for it in the backlog but not entirely sure how much effort is involved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds reasonable to address it there as well, so leave this as is?

Copy link
Member

Choose a reason for hiding this comment

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

@clavedeluna what I mean is we should fix this behavior in the codemod by automatically deconflicting variable names.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, turns out calling deep_equals predates having file_context.codemod_changes so I think as long as you replace the deep_equals call with checking if there are any changes (and we assume that we always record the change), then we should be good

@clavedeluna clavedeluna requested a review from drdavella October 6, 2023 16:34
@clavedeluna
Copy link
Contributor Author

@clavedeluna
Copy link
Contributor Author

this is now ready for final review along with pixee/codemodder-python#78

@clavedeluna clavedeluna merged commit ecac39a into main Oct 18, 2023
2 checks passed
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.

2 participants