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

Consider asttokens for getting text range of AST nodes #668

Open
alexmojaki opened this issue Jan 11, 2021 · 1 comment
Open

Consider asttokens for getting text range of AST nodes #668

alexmojaki opened this issue Jan 11, 2021 · 1 comment

Comments

@alexmojaki
Copy link

https://github.com/gristlabs/asttokens is a library which maps AST nodes (including for astroid trees) to source tokens. If I understand correctly, it would solve the problem currently handled in your setendings module. If you are having issues maintaining that code, consider replacing it with asttokens which is thoroughly tested and trustworthy.

@david-yz-liu
Copy link
Contributor

Thanks for the link, I'll definitely look at this!

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

2 participants