-
Notifications
You must be signed in to change notification settings - Fork 391
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
Improve algorithmic codegen, return multiline string #167
Conversation
@@ -3,6 +3,8 @@ | |||
from __future__ import annotations | |||
|
|||
import ast | |||
import contextlib | |||
from typing import Generator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use collections.abc
rather than typing
for generic types.
from typing import Generator | |
from collections.abc import Generator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious as to why not use typing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Yusuke Oda <[email protected]>
LGTM, merge this PR |
Overview
Algorithmic codegen now returns a multiline string instead of a very long single line string.
Details
We keep track of our indentation level as we traverse through the AST.
Example
old
new
References
#57
Blocked by
None