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

fix: make the Python importing algorithm smarter #240

Merged
merged 9 commits into from
Sep 30, 2024
Merged

Conversation

morgante
Copy link
Contributor

Find the last statement in the "import block" and add imports after that.

Fixes getgrit/gritql#524

@morgante morgante merged commit f04a793 into main Sep 30, 2024
5 checks passed
@morgante morgante deleted the smarter-import branch September 30, 2024 06:38
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.

add_import can insert the import in the wrong place resulting in invalid code
1 participant