-
Notifications
You must be signed in to change notification settings - Fork 269
add table comment to generated code #215
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
base: master
Are you sure you want to change the base?
Conversation
Adding comment to class doc string will help IDE to provide useful hints. |
This needs a rebase against master, tests to cover the new functionality, and a changelog entry. |
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 PR doesn't actually add the comment back to the table metadata. Should it?
@@ -1139,6 +1141,10 @@ def render_class_declaration(self, model: ModelClass) -> str: | |||
) | |||
return f"class {model.name}({parent_class_name}):" | |||
|
|||
def render_table_comment(self, model: ModelClass) -> str: | |||
if model.table.comment: | |||
return f'"""{model.table.comment}"""' |
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 wrapping for long docstrings then...?
sections.append(comments) | ||
# Render class variables / special declarations |
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.
Add a blank line after a control block ends.
sections.append(comments) | |
# Render class variables / special declarations | |
sections.append(comments) | |
# Render class variables / special declarations |
I have to review this PR. it's very old. I've moved it out of 3.1 for the time being , as with what little time I have left, I'd like to focus on :
We'll tackle this one in future milestones 😄 |
No description provided.