-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
How to declare an element with an argument sink #4
Comments
Good question! While I think the constructor is easier to override if we assume that the positional arguments are required, so they can't be specified in set rules. However, if they are not required, then overriding If you need to override (I think I should probably just make |
However, this is expected to become a built-in feature in the future. |
Alright, cool. Regarding things like |
I've updated There are now instructions for this exact request in the docs: https://pgbiel.github.io/elembic/elements/creating/overriding-constr.html#argument-sink |
Great, it works. However, now " |
When I do #show: e.set_(my-element, some-named-field: 2) it complains with this part:
|
Oh, that was a terrible oversight on my part. I forgot to check whether the positional arguments weren't empty before throwing the error, and if they were, not passing the additional argument. I've fixed the example in the docs now. Thanks! |
Now it works perfectly |
Is it possible to declare an element that has a sink of (mostly positional I guess) arguments, like
grid
orstack
?The text was updated successfully, but these errors were encountered: