Skip to content

Find and replace only if imported from specific module #1039

Discussion options

You must be logged in to vote

While I don’t have a direct answer, I suggest experimenting with the ast-grep playground to test out your patterns and replacements. It’s a great way to see how ast-grep behaves with different code snippets. You can also get inspiration from examples

Also, consider posting your question on Stack Overflow with the tag ast-grep for a broader audience. There’s a chance that other developers might have encountered a similar issue and can provide insights or solutions. https://stackoverflow.com/questions/tagged/ast-grep

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ild0tt0re
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants