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: when there are no schema properties, we add 'pass' to the constructor #85
Conversation
partials/model-class
Outdated
@@ -27,8 +27,9 @@ | |||
): | |||
{%- for name, prop in properties -%} | |||
{%- set typeInfo = [name, prop] | getTypeInfo %} | |||
{{ indent3}}self.{{typeInfo.pythonName}} = {{typeInfo.pythonName}} | |||
{{ indent3 }}self.{{typeInfo.pythonName}} = {{typeInfo.pythonName}} |
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.
Is there a reason there are spaces around indent3
and not around typeInfo.pythonName
? If not, I suggest we add the spaces in for consistency.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
I still can't merge this. I was reading up on codeowners and found this: "The people you choose as code owners must have write permissions for the repository." I'm not sure if Cameron or I have write permission. |
@damaru-inc the reason is that @CameronRushton did not yet accept an email invitation to have |
🎉 This PR is included in version 0.2.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
In cases where a schema has no properties, the model class ends up with a constructor looking like this:
which is invalid. This fix adds 'pass' :
def init (self):
pass
Related issue(s)
Fixes #60