fontParts
fontParts copied to clipboard
Annotate and document `info.py`.
@benkiel I ran into a few problems with this module:
- What are the available types for the
valueparameter in_validateFontInfoAttributeValue? - Where are the magic methods in this class defined?
mypythrows this error:info.py:107: error: "__hasattr__" undefined in superclass [misc] - What value types is
BaseInfo.__setattr__supposed to return? In my experience__setattr__is supposed to returnNone, yet here, the method is treated as if returning something else. - What is
_getAttrsupposed to return?mypythrows this error:info.py:113: error: "_getAttr" of "BaseInfo" does not return a value (it only ever returns None) [func-returns-value] - Isn't
_fromMathInfosupposed to return anything? It's missing a return statement, yet its called in the return of the public equivalent. It also returns thismypyerror:info.py:271: error: "_fromMathInfo" of "BaseInfo" does not return a value (it only ever returns None) [func-returns-value] mypythrows the this error due to the differences in signature with the base method:
Not sure of the best way to deal with this.info.py:230: error: Signature of "update" incompatible with supertype "DeprecatedBase" [override] info.py:230: note: Superclass: info.py:230: note: def update(self) -> Any info.py:230: note: Subclass: info.py:230: note: def update(self, other: BaseInfo) -> Nonemypyalso shows this error, (I think) due toBaseInfonot following theannotations.Interpolatableprotocol:
How should this be handled?info.py:369: error: Value of type variable "InterpolatableType" of "interpolate" cannot be "BaseInfo"
@knutnergaard, this is just a note that I've not forgotten this — I'm caught up in end-of-year things. I will get to it by the weekend.
Hey @knutnergaard, just a ping to let you know that I have not forgotten this: work and holidays. Will get you answers this coming week.
@benkiel No worries, I'm very busy myself these days.