-
Notifications
You must be signed in to change notification settings - Fork 491
Make PointPen argument names consistent #3821
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
base: main
Are you sure you want to change the base?
Conversation
I don't recall the old discussion but looking at it now, I am wondering if the change is actually needed. What is this change making argument names consistent with? The base AbstractPointPen originally had |
There are also some mixins (e.g. The newer But of course you're right, there is no functional reason to change anything. |
We hit a real-world issue this week that this PR would solve: RoundingPointPen calls its target pen with an explicitly named A workaround is possible, e.g., passing the argument positionally, but it would be nice to achieve proper typing and eliminate this whole class of error forever. |
technically that's a bug in ufoLib2 because the GlyphPointPen subclasses AbstractPointPen (just like RoundingPointPen) so it should really have |
@Hoolean are you sure this PR would actually solve that bug you pointed at? ufoLib2 GlyphPointPen still calls its parameter |
xx, xy, yx, yy, dx, dy = transformation | ||
self._outPen.addComponent( | ||
baseGlyphName=baseGlyphName, | ||
glyphName=glyphName, |
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.
I suggest you just pass glyphName
as a positional argument here
Has been discussed before in #2919. Consistently use
glyphName
,transformation
as argument names instead of a mixture (baseGlyphName
,glyphName
,transform
,transformation
).Maybe the imminent drop of Python 3.8 support is a good point to make those args consistent.