You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Later on in my code, I would create a new entity by writing something like sv = SchemaVersion(version='1.0.0', version_date=dt.date.today()). Given that I'm a forgetful programmer, I would hope that it would show me the class attributes when I try to create a new instance, but when I try this in VSCode, I see the following auto-completion:
Apart from reimplementing each class's __init__() method, is there a way to structure my code such that Intellisense can pick up the attribute definitions? I guess my question is: is this the intended behavior, or am I doing something incorrect with how I'm defining my models?
It appears to work if I define my model like this, but I'm not sure if this is compatible with how Pony does things (I think it should be, but I'm not sure):
I'm brand new to using Pony, but wondering if what I'm expecting to see is possible...
Let's say I create a model/DB table:
Later on in my code, I would create a new entity by writing something like
sv = SchemaVersion(version='1.0.0', version_date=dt.date.today())
. Given that I'm a forgetful programmer, I would hope that it would show me the class attributes when I try to create a new instance, but when I try this in VSCode, I see the following auto-completion:Apart from reimplementing each class's
__init__()
method, is there a way to structure my code such that Intellisense can pick up the attribute definitions? I guess my question is: is this the intended behavior, or am I doing something incorrect with how I'm defining my models?It appears to work if I define my model like this, but I'm not sure if this is compatible with how Pony does things (I think it should be, but I'm not sure):
This also requires writing a lot more boilerplate code for each class, unforunately.
The text was updated successfully, but these errors were encountered: