-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Problem
Some recent changes (eg, #189) have created difficulties for Pylance/Pyright to infer that Font.kerning is of type Kerning:
See also a non-property for comparison:
Is it because that the property class isn’t generic? I tried to look into issue tickets in the Pylance and Pyright projects but haven’t found anything helpful.
Potential solution
Seems it works alright if we write the properties (eg, .kerning and .lib) in the decorator style:
To be clear, I don’t really understand type checkers enough to tell if the decorator method is an arbitrary workaround or a long term solution, and I certainly don’t want to make the maintainers to randomly patch ufoLib2 only for some specific type checkers’ temporary limitations…
Metadata
Metadata
Assignees
Labels
No labels


