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

Avoid calls to ast in plugins #918

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Avoid calls to ast in plugins #918

wants to merge 1 commit into from

Conversation

ericwb
Copy link
Member

@ericwb ericwb commented Jun 28, 2022

If one day we do wish to have the capability to swap the builtin
Python ast for another parser, it's best to abstract any direct
calls to the ast parser in plugins.

This change addresses calls from plugins and other functions to
isinstance with ast node types as arguments. Further work is needed
for other ast calls in subsequent patches.

Related to #894

Signed-off-by: Eric Brown eric_wade_brown@yahoo.com

If one day we do wish to have the capability to swap the builtin
Python ast for another parser, it's best to abstract any direct
calls to the ast parser in plugins.

This change addresses calls from plugins and other functions to
isinstance with ast node types as arguments. Further work is needed
for other ast calls in subsequent patches.

Related to #894

Signed-off-by: Eric Brown <eric_wade_brown@yahoo.com>
@ericwb ericwb reopened this Jul 8, 2022
Copy link
Member

@lukehinds lukehinds left a comment

Choose a reason for hiding this comment

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

looks good to me.

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.

None yet

2 participants