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

[refactor] Remove import taichi in ast_transformer #3827

Merged
merged 9 commits into from
Dec 24, 2021

Conversation

lin-hitonami
Copy link
Contributor

@lin-hitonami lin-hitonami commented Dec 17, 2021

Related issue = #3782
In taichi/lang/__init.py, from taichi.lang.ndrange import ndrange is a bit confusing both to me and the IDE because it imports the class ndrange and shadows the module ndrange. But at the time of loading ast_transformer.py, this line is not yet executed. So, when I from taichi.lang import ndrange in ast_transformer.py, it imports the module. In order to solve this confusing situation, I moved the import of ndrange to taichi/__init__.py

@netlify
Copy link

netlify bot commented Dec 17, 2021

✔️ Deploy Preview for jovial-fermat-aa59dc canceled.

🔨 Explore the source changes: 7dec754

🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/61c53fd467c76200087c11fa

@lin-hitonami lin-hitonami marked this pull request as ready for review December 24, 2021 04:01
Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

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

LGTM!

@strongoier strongoier merged commit a31d180 into taichi-dev:master Dec 24, 2021
@lin-hitonami lin-hitonami deleted the import_ast branch January 7, 2022 04:48
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

3 participants