Closed dangotbanned closed 2 weeks ago
If I recall correctly, not every mark supports the same variable definitions, do you assume here that all marks can use the same MarkDef
? Btw, I've no supporting materials yet that supports my assumption.
@mattijn thanks for looking at this so soon!
If I recall correctly, not every mark supports the same variable definitions, do you assume here that all marks can use the same
MarkDef
? Btw, I've no supporting materials yet that supports my assumption.
Just to be sure I understand what you mean, are you referring to this old comment?
I've interpretted that as meaning how the docs for MarkDef has some descriptions which state they only apply for specific marks (e.g. x2
applies to {"area", "bar", "rect", "rule"}
).
If so, I don't think there would be a reliable way to do that - since the descriptions aren't written in a consistent style.
Or did you mean core.MarkDef
vs the composite marks?
If so, then yeah these are split out correctly
I mean the latter. Good to see that the composite marks are still treated differently, but I thought that not all arguments can be used within the standard marks. It seems that it was and will be covered by just the MarkDef
.
Thanks!
Thanks!
Appreciate the review thanks @mattijn
Closes #3262
Description
This PR is a 2-for-1.
mixins.py
from 3500 to 1600 linesWhat I've done here is created a dummy version of each class, where the only difference is the omission of
type
. The dummy is used only for the signature & docstring.If we used
core.MarkDef
directly, it always displaystype
first. I'm assuming that wouldn't be desirable - since we set that explicitly in the method bodyExample
IDE
https://github.com/user-attachments/assets/83d8f08b-9ce5-4856-8a5b-9e52e8a72f20
API reference
Remains unchanged
![image](https://github.com/user-attachments/assets/8d8ebbac-d025-4b54-a3a3-9fd352bb9dbc)