-
Notifications
You must be signed in to change notification settings - Fork 8
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
Feature/codegen refactor #11
Conversation
25ad629
to
70658e1
Compare
gql/utils_codegen.py
Outdated
@@ -4,6 +4,17 @@ | |||
|
|||
|
|||
class CodeGenerator: |
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.
This class should not be called CodeGenerator
. Maybe CodeChunk
.
def block(self): | ||
return self.Block(self) | ||
|
||
def write_block(self, block_header: str, *args, **kwargs): |
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.
I'm also not happy about this name either.
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.
@aviv-ebates maybe begin_block
?
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.
no begin is not good because it also in charge of ending...
gql/utils_codegen.py
Outdated
return self.gen | ||
|
||
def __exit__(self, exc_type, exc_val, exc_tb): | ||
self.gen.undent() |
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.
unindent
No description provided.