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
{{ message }}
Repository navigation
Documentation of AnchoredText's prop keyword argument is misleading #12467
This bug is nearly identical to #12121, but affects AnchoredText instead of TextArea.
The documentation for AnchoredText strongly suggests that the keyword argument prop should be a FontProperties object. However, inspecting the source code suggests that prop should instead be a dictionary of keyword arguments that will be passed to the TextArea object inside of AnchoredText.
I propose rewording the documentation to make it clear that prop should be a dictionary of keyword arguments to construct the TextArea instance.
Perhaps it would be worthwhile to look over the documentation of other classes in offsetbox for similar issues, since this is the second time I've come across the same issue.
changed the title [-]Documentation of AnchoredText's props keyword argument is misleading[/-][+]Documentation of AnchoredText's prop keyword argument is misleading[/+]on Oct 9, 2018
Sure, judging from #12434 you already know how that would be fixed. So if you have the time, just go ahead (no need to open a new issue for each item you find).
Maybe I should make another issue for this, but it would be nice if TextArea and AnchoredText had a consistent API, maybe by renaming the prop argument of AnchoredText to be fontprops as is used by TextArea, which has the added benefit of being more descriptive.
It seems like it would be fairly easy to also support the old keyword, to prevent breaking people's code.
What's the attitude around here to such API changes? All things considered, it's a very minor complaint.
Activity
[-]Documentation of AnchoredText's props keyword argument is misleading[/-][+]Documentation of AnchoredText's prop keyword argument is misleading[/+]ImportanceOfBeingErnest commentedon Oct 9, 2018
Sure, judging from #12434 you already know how that would be fixed. So if you have the time, just go ahead (no need to open a new issue for each item you find).
galenlynch commentedon Oct 9, 2018
Maybe I should make another issue for this, but it would be nice if
TextAreaandAnchoredTexthad a consistent API, maybe by renaming thepropargument ofAnchoredTextto befontpropsas is used byTextArea, which has the added benefit of being more descriptive.It seems like it would be fairly easy to also support the old keyword, to prevent breaking people's code.
What's the attitude around here to such API changes? All things considered, it's a very minor complaint.
Clarify documentation of offsetbox.AnchoredText's prop kw argument